use of org.neo4j.test.LogTestUtils.CountingLogHook in project neo4j by neo4j.
the class ReadTransactionLogWritingTest method countLogEntries.
private long countLogEntries() {
GraphDatabaseAPI db = dbr.getGraphDatabaseAPI();
FileSystemAbstraction fs = db.getDependencyResolver().resolveDependency(FileSystemAbstraction.class);
File storeDir = new File(db.getStoreDir());
try {
CountingLogHook<LogEntry> logicalLogCounter = new CountingLogHook<>();
filterNeostoreLogicalLog(fs, storeDir.getPath(), logicalLogCounter);
long txLogRecordCount = db.getDependencyResolver().resolveDependency(LogFileInformation.class).getLastEntryId();
return logicalLogCounter.getCount() + txLogRecordCount;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Aggregations