Merge pull request #1559 from nosqlbench/jshook/minorfixes

Jshook/minorfixes
This commit is contained in:
Jonathan Shook
2023-09-25 15:08:27 -05:00
committed by GitHub
3 changed files with 11 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ public class AtomicInput implements Input, ActivityDefObserver, Gauge<Long>, NBL
this.activityDef = activityDef;
onActivityDefUpdate(activityDef);
ActivityMetrics.gauge(this, "input_cycles_first", new NBFunctionGauge(this, () -> (double)this.cycles_min.get()));
ActivityMetrics.gauge(this, "input_cycles_last", new NBFunctionGauge(this, () -> (double)this.cycles_min.get()));
ActivityMetrics.gauge(this, "input_cycles_last", new NBFunctionGauge(this, () -> (double)this.cycles_max.get()));
ActivityMetrics.gauge(this, "input_cycle", new NBFunctionGauge(this, () -> (double)this.cycle_value.get()));
ActivityMetrics.gauge(this, "input_cycles_total", new NBFunctionGauge(this, this::getTotalCycles));
ActivityMetrics.gauge(this, "input_recycles_first", new NBFunctionGauge(this, () -> (double)this.recycles_min.get()));

View File

@@ -51,7 +51,7 @@ public class LongTreeTracker {
/**
* Apply an index value between 0 and 31 inclusive. Return the accumulator.
* If all 32 slots of this tracker have been isCycleCompleted, the returned value will
* If all 32 slots of this tracker have been completed, the returned value will
* have LSB bit 2 set.
* @param index a long value between 0 and 31 to mark as complete
* @param image the long value which serves as the starting state of the bit field
@@ -62,19 +62,14 @@ public class LongTreeTracker {
while (position > 0) {
long applybt = 1L << position;
// System.out.println("applybt:\n" + diagString(applybt));
// System.out.print("image:\n" + this);
image |= applybt;
long comask = applybt | (applybt & eens) >> 1 | (applybt & odds) << 1;
// System.out.println("comask:\n" + diagString(comask));
if ((comask & image) != comask) {
long co_mask = applybt | (applybt & eens) >> 1 | (applybt & odds) << 1;
if ((co_mask & image) != co_mask) {
break;
}
position >>= 1;
}
// System.out.println("image:\n" + this);
// TODO Fix this test
return image;
return image;
}
public long setCompleted(long index) {

View File

@@ -57,4 +57,10 @@ public class Colors {
public static String ANSI_BrightWhiteBG = (char) 27 + "[107m";
public static String ANSI_Reset = (char) 27 + "[39;49m";
public static String ANSI_CURSOR_LEFT = (char) 27 + "[1D";
public static String ANSI_CURSOR_LEFT(int distance) {
return (char) 27 + "[" + distance + "D";
}
}