From 5b830cfa260502eb3f449c7a03fc7d1a985e2059 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Fri, 9 Sep 2022 11:08:47 -0500 Subject: [PATCH] more accurate var names --- .../api/activityimpl/motor/CoreMotor.java | 17 ++++++++--------- .../core/script/NashornActivityBindings.java | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/motor/CoreMotor.java b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/motor/CoreMotor.java index a3e1f5c30..d31028ecc 100644 --- a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/motor/CoreMotor.java +++ b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/motor/CoreMotor.java @@ -58,11 +58,11 @@ public class CoreMotor implements ActivityDefObserver, Motor, Stoppable { private Timer inputTimer; private RateLimiter strideRateLimiter; - private Timer stridesServiceTimer; + private Timer strideServiceTimer; private Timer stridesResponseTimer; private RateLimiter cycleRateLimiter; - private Timer cyclesTimer; + private Timer cycleServiceTimer; private Timer cycleResponseTimer; private Input input; @@ -187,7 +187,7 @@ public class CoreMotor implements ActivityDefObserver, Motor, Stoppable { try { inputTimer = activity.getInstrumentation().getOrCreateInputTimer(); - stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); + strideServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); stridesResponseTimer = activity.getInstrumentation().getStridesResponseTimerOrNull(); optrackerBlockCounter = activity.getInstrumentation().getOrCreateOpTrackerBlockedCounter(); @@ -255,7 +255,7 @@ public class CoreMotor implements ActivityDefObserver, Motor, Stoppable { } StrideTracker strideTracker = new StrideTracker<>( - stridesServiceTimer, + strideServiceTimer, stridesResponseTimer, strideDelay, cycleSegment.peekNextCycle(), @@ -328,9 +328,8 @@ public class CoreMotor implements ActivityDefObserver, Motor, Stoppable { } else if (action instanceof SyncAction) { - cyclesTimer = activity.getInstrumentation().getOrCreateCyclesServiceTimer(); - stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); - phasesTimer = activity.getInstrumentation().getOrCreatePhasesServiceTimer(); + cycleServiceTimer = activity.getInstrumentation().getOrCreateCyclesServiceTimer(); + strideServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); if (activity.getActivityDef().getParams().containsKey("async")) { throw new RuntimeException("The async parameter was given for this activity, but it does not seem to know how to do async."); @@ -394,14 +393,14 @@ public class CoreMotor implements ActivityDefObserver, Motor, Stoppable { } finally { long cycleEnd = System.nanoTime(); - cyclesTimer.update((cycleEnd - cycleStart) + cycleDelay, TimeUnit.NANOSECONDS); + cycleServiceTimer.update((cycleEnd - cycleStart) + cycleDelay, TimeUnit.NANOSECONDS); } segBuffer.append(cyclenum, result); } } finally { long strideEnd = System.nanoTime(); - stridesServiceTimer.update((strideEnd - strideStart) + strideDelay, TimeUnit.NANOSECONDS); + strideServiceTimer.update((strideEnd - strideStart) + strideDelay, TimeUnit.NANOSECONDS); } if (output != null) { diff --git a/engine-core/src/main/java/io/nosqlbench/engine/core/script/NashornActivityBindings.java b/engine-core/src/main/java/io/nosqlbench/engine/core/script/NashornActivityBindings.java index 959d3e7fc..d069f594e 100644 --- a/engine-core/src/main/java/io/nosqlbench/engine/core/script/NashornActivityBindings.java +++ b/engine-core/src/main/java/io/nosqlbench/engine/core/script/NashornActivityBindings.java @@ -99,8 +99,8 @@ public class NashornActivityBindings implements Bindings, ProxyObject { @Override public Bindings get(Object key) { - Bindings activityDef = scenario.getActivityDef(String.valueOf(key)).getParams(); - return activityDef; + Bindings activityParams = scenario.getActivityDef(String.valueOf(key)).getParams(); + return activityParams; } @Override