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);
}
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);
}
Aggregations