Search in sources :

Example 1 with OPerformanceStatisticManager

use of com.orientechnologies.orient.core.storage.impl.local.statistic.OPerformanceStatisticManager in project orientdb by orientechnologies.

the class PageCacheTest method before.

@Before
public void before() throws IOException {
    this.writeCache = new WriteCache();
    this.readCache = new ReadCache();
    this.pageCache = case_.createPageCache(readCache);
    this.atomicOperation = new AtomicOperation(new OLogSequenceNumber(0, 0), null, readCache, writeCache, -1, new OPerformanceStatisticManager(null, 10000, 10000));
    this.writeAheadLog = new WriteAheadLog();
    writeCache.addFile("file");
    readCache.allocateNewPage(0, writeCache);
    readCache.allocateNewPage(0, writeCache);
    readCache.allocateNewPage(0, writeCache);
    readCache.allocateNewPage(0, writeCache);
    readCache.allocateNewPage(0, writeCache);
    readCache.allocateNewPage(0, writeCache);
}
Also used : OLogSequenceNumber(com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OLogSequenceNumber) OAtomicOperation(com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation) OWriteAheadLog(com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWriteAheadLog) OPerformanceStatisticManager(com.orientechnologies.orient.core.storage.impl.local.statistic.OPerformanceStatisticManager) Before(org.junit.Before)

Example 2 with OPerformanceStatisticManager

use of com.orientechnologies.orient.core.storage.impl.local.statistic.OPerformanceStatisticManager in project orientdb by orientechnologies.

the class WriteAheadLogTest method createWAL.

private ODiskWriteAheadLog createWAL(int maxPagesCacheSize, int maxSegmentSize) throws IOException {
    OLocalPaginatedStorage paginatedStorage = mock(OLocalPaginatedStorage.class);
    when(paginatedStorage.getName()).thenReturn("WriteAheadLogTest");
    when(paginatedStorage.getStoragePath()).thenReturn(testDir.getAbsolutePath());
    OStorageConfiguration configurationMock = mock(OStorageConfiguration.class);
    when(configurationMock.getLocaleInstance()).thenReturn(Locale.getDefault());
    when(paginatedStorage.getConfiguration()).thenReturn(configurationMock);
    when(paginatedStorage.getPerformanceStatisticManager()).thenReturn(new OPerformanceStatisticManager(paginatedStorage, Long.MAX_VALUE, -1));
    return new ODiskWriteAheadLog(maxPagesCacheSize, -1, maxSegmentSize, null, true, paginatedStorage, 10);
}
Also used : OLocalPaginatedStorage(com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage) OStorageConfiguration(com.orientechnologies.orient.core.config.OStorageConfiguration) OPerformanceStatisticManager(com.orientechnologies.orient.core.storage.impl.local.statistic.OPerformanceStatisticManager)

Aggregations

OPerformanceStatisticManager (com.orientechnologies.orient.core.storage.impl.local.statistic.OPerformanceStatisticManager)2 OStorageConfiguration (com.orientechnologies.orient.core.config.OStorageConfiguration)1 OLocalPaginatedStorage (com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage)1 OAtomicOperation (com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation)1 OLogSequenceNumber (com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OLogSequenceNumber)1 OWriteAheadLog (com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWriteAheadLog)1 Before (org.junit.Before)1