From bcf188caf317ca4efb48704e2f69853b567e8f3d Mon Sep 17 00:00:00 2001 From: acarbonetto Date: Tue, 14 Nov 2023 14:54:36 -0800 Subject: [PATCH] Clean up timer Signed-off-by: acarbonetto --- .../main/java/javababushka/benchmarks/utils/Benchmarking.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java index d52f051ead..1d3d842b35 100644 --- a/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java @@ -161,7 +161,6 @@ public static void testClientSetGet( ChosenAction.GET_EXISTING, new ArrayList<>(), ChosenAction.GET_NON_EXISTING, new ArrayList<>(), ChosenAction.SET, new ArrayList<>()); - int tasksCompleted = 0; int iterationIncrement = iterationCounter.getAndIncrement(); int clientIndex = iterationIncrement % clients.size(); @@ -182,7 +181,6 @@ public static void testClientSetGet( Pair result = measurePerformance(actions); taskActionResults.get(result.getLeft()).add(result.getRight()); - tasksCompleted++; iterationIncrement = iterationCounter.getAndIncrement(); clientIndex = iterationIncrement % clients.size(); } @@ -206,6 +204,7 @@ public static void testClientSetGet( e.printStackTrace(); throw new RuntimeException(e); } + long after = System.nanoTime(); // Map to save latency results separately for each action Map> actionResults = @@ -225,7 +224,6 @@ public static void testClientSetGet( e.printStackTrace(); } }); - long after = System.nanoTime(); var calculatedResults = calculateResults(actionResults); if (config.resultsFile.isPresent()) {