more accurate var names

This commit is contained in:
Jonathan Shook 2022-09-09 11:08:47 -05:00
parent fa1ae8c269
commit 5b830cfa26
2 changed files with 10 additions and 11 deletions

View File

@ -58,11 +58,11 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
private Timer inputTimer; private Timer inputTimer;
private RateLimiter strideRateLimiter; private RateLimiter strideRateLimiter;
private Timer stridesServiceTimer; private Timer strideServiceTimer;
private Timer stridesResponseTimer; private Timer stridesResponseTimer;
private RateLimiter cycleRateLimiter; private RateLimiter cycleRateLimiter;
private Timer cyclesTimer; private Timer cycleServiceTimer;
private Timer cycleResponseTimer; private Timer cycleResponseTimer;
private Input input; private Input input;
@ -187,7 +187,7 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
try { try {
inputTimer = activity.getInstrumentation().getOrCreateInputTimer(); inputTimer = activity.getInstrumentation().getOrCreateInputTimer();
stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); strideServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer();
stridesResponseTimer = activity.getInstrumentation().getStridesResponseTimerOrNull(); stridesResponseTimer = activity.getInstrumentation().getStridesResponseTimerOrNull();
optrackerBlockCounter = activity.getInstrumentation().getOrCreateOpTrackerBlockedCounter(); optrackerBlockCounter = activity.getInstrumentation().getOrCreateOpTrackerBlockedCounter();
@ -255,7 +255,7 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
} }
StrideTracker<D> strideTracker = new StrideTracker<>( StrideTracker<D> strideTracker = new StrideTracker<>(
stridesServiceTimer, strideServiceTimer,
stridesResponseTimer, stridesResponseTimer,
strideDelay, strideDelay,
cycleSegment.peekNextCycle(), cycleSegment.peekNextCycle(),
@ -328,9 +328,8 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
} else if (action instanceof SyncAction) { } else if (action instanceof SyncAction) {
cyclesTimer = activity.getInstrumentation().getOrCreateCyclesServiceTimer(); cycleServiceTimer = activity.getInstrumentation().getOrCreateCyclesServiceTimer();
stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); strideServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer();
phasesTimer = activity.getInstrumentation().getOrCreatePhasesServiceTimer();
if (activity.getActivityDef().getParams().containsKey("async")) { 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."); 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<D> implements ActivityDefObserver, Motor<D>, Stoppable {
} finally { } finally {
long cycleEnd = System.nanoTime(); long cycleEnd = System.nanoTime();
cyclesTimer.update((cycleEnd - cycleStart) + cycleDelay, TimeUnit.NANOSECONDS); cycleServiceTimer.update((cycleEnd - cycleStart) + cycleDelay, TimeUnit.NANOSECONDS);
} }
segBuffer.append(cyclenum, result); segBuffer.append(cyclenum, result);
} }
} finally { } finally {
long strideEnd = System.nanoTime(); long strideEnd = System.nanoTime();
stridesServiceTimer.update((strideEnd - strideStart) + strideDelay, TimeUnit.NANOSECONDS); strideServiceTimer.update((strideEnd - strideStart) + strideDelay, TimeUnit.NANOSECONDS);
} }
if (output != null) { if (output != null) {

View File

@ -99,8 +99,8 @@ public class NashornActivityBindings implements Bindings, ProxyObject {
@Override @Override
public Bindings get(Object key) { public Bindings get(Object key) {
Bindings activityDef = scenario.getActivityDef(String.valueOf(key)).getParams(); Bindings activityParams = scenario.getActivityDef(String.valueOf(key)).getParams();
return activityDef; return activityParams;
} }
@Override @Override