diff --git a/performanceDb/src/main/java/org/lucares/performance/db/PerformanceDb.java b/performanceDb/src/main/java/org/lucares/performance/db/PerformanceDb.java index 6e7d938..08eb1fb 100644 --- a/performanceDb/src/main/java/org/lucares/performance/db/PerformanceDb.java +++ b/performanceDb/src/main/java/org/lucares/performance/db/PerformanceDb.java @@ -67,7 +67,7 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils { long count = 0; try { - long start = System.nanoTime(); + long start = System.currentTimeMillis(); while (true) { final Optional entryOptional = entries.next(); @@ -87,16 +87,11 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils { if (count % blocksize == 0) { final long end = System.nanoTime(); - final double duration = (end - start) / 1_000_000.0; - LOGGER.debug("inserting the last " + blocksize + " took " + duration + " ms; " + Stats.duration - + "ms of " + Stats.count + " operations. total entries: " + count / 1_000_000.0 - + " million"); + final long duration = end - start; + LOGGER.debug("inserting the last " + blocksize + " took " + duration + " ms; total entries: " + + count / 1_000_000.0 + " million"); - // System.out.println(entry); - - start = System.nanoTime(); - Stats.duration = 0.0; - Stats.count = 0; + start = System.currentTimeMillis(); } if (count % blocksize == 0) { diff --git a/performanceDb/src/main/java/org/lucares/performance/db/Stats.java b/performanceDb/src/main/java/org/lucares/performance/db/Stats.java deleted file mode 100644 index de17562..0000000 --- a/performanceDb/src/main/java/org/lucares/performance/db/Stats.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lucares.performance.db; - -public class Stats { - public static double duration = 0.0; - - public static long count = 0; - - { - final long s = System.nanoTime(); - final long e = System.nanoTime(); - Stats.duration += (e - s) / 1_000_000.0; - Stats.count++; - } -}