mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
make progress reporter send a final report
This commit is contained in:
@@ -80,6 +80,10 @@ public class ActivitiesProgressIndicator implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
report();
|
||||
}
|
||||
|
||||
private void report() {
|
||||
Collection<ProgressMeterDisplay> progressMeterDisplays = sc.getProgressMeters();
|
||||
for (ProgressMeterDisplay meter : progressMeterDisplays) {
|
||||
|
||||
@@ -117,4 +121,7 @@ public class ActivitiesProgressIndicator implements Runnable {
|
||||
return "ProgressIndicator/" + this.indicatorSpec;
|
||||
}
|
||||
|
||||
public void finish() {
|
||||
report();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,8 @@ public class NBBufferedContainer extends NBBaseComponent implements NBContainer
|
||||
.build()
|
||||
);
|
||||
|
||||
this.activitiesProgressIndicator = new ActivitiesProgressIndicator(this.controller, "console:10s");
|
||||
String progress = getComponentProp("progress").orElse("console:10s");
|
||||
this.activitiesProgressIndicator = new ActivitiesProgressIndicator(this.controller, progress);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +176,7 @@ public class NBBufferedContainer extends NBBaseComponent implements NBContainer
|
||||
logger.debug("no object was provided to set the container result");
|
||||
}
|
||||
|
||||
activitiesProgressIndicator.finish();
|
||||
return safeCmdResult;
|
||||
}
|
||||
|
||||
@@ -195,6 +197,6 @@ public class NBBufferedContainer extends NBBaseComponent implements NBContainer
|
||||
final var retiringScenarioShutdownHook = this.containerShutdownHook;
|
||||
this.containerShutdownHook = null;
|
||||
retiringScenarioShutdownHook.run();
|
||||
this.logger.debug("removing container shutdown hook");
|
||||
logger.debug("removing container shutdown hook");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user