use of org.jrobin.core.RrdNioBackendFactory in project opennms by OpenNMS.
the class JRobinConverterTest method testBackends.
@Test
public void testBackends() throws Exception {
final RrdBackendFactory[] factories = new RrdBackendFactory[] { new RrdFileBackendFactory(), new RrdNioBackendFactory(), new RrdNioByteBufferBackendFactory(), new RrdJRobin14FileBackendFactory(LockMode.EXCEPTION_IF_LOCKED), new RrdJRobin14FileBackendFactory(LockMode.WAIT_IF_LOCKED), new RrdJRobin14FileBackendFactory(LockMode.NO_LOCKS) };
for (final RrdBackendFactory factory : factories) {
// LogUtils.infof(this, "starting with backend factory %s", factory);
m_sineFull.delete();
m_sineSourceA.delete();
long factoryStart = System.nanoTime();
createMockSineRrds(factory);
for (int i = 0; i < 10; i++) {
final File newFile = m_converter.createTempRrd(m_sineFull);
try {
m_converter.consolidateRrdFile(m_sineSourceA, newFile);
} finally {
newFile.delete();
}
}
long nanos = System.nanoTime() - factoryStart;
LogUtils.infof(this, "factory %s took %f seconds", factory, (nanos / 1000000000D));
}
}
Aggregations