mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
improvements to scenario log handling
This commit is contained in:
@@ -29,8 +29,8 @@ import io.nosqlbench.nb.api.logging.NBLogLevel;
|
||||
import io.nosqlbench.nb.api.markdown.exporter.MarkdownExporter;
|
||||
import io.nosqlbench.virtdata.userlibs.apps.VirtDataMainApp;
|
||||
import joptsimple.internal.Strings;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.core.config.ConfigurationFactory;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -40,7 +40,9 @@ import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -332,14 +334,15 @@ public class NBCLI {
|
||||
ScenariosExecutor executor = new ScenariosExecutor("executor-" + sessionName, 1);
|
||||
|
||||
Scenario scenario = new Scenario(
|
||||
sessionName,
|
||||
options.getScriptFile(),
|
||||
options.getScriptingEngine(),
|
||||
options.getProgressSpec(),
|
||||
options.wantsGraaljsCompatMode(),
|
||||
options.wantsStackTraces(),
|
||||
options.wantsCompileScript(),
|
||||
String.join("\n", args)
|
||||
sessionName,
|
||||
options.getScriptFile(),
|
||||
options.getScriptingEngine(),
|
||||
options.getProgressSpec(),
|
||||
options.wantsGraaljsCompatMode(),
|
||||
options.wantsStackTraces(),
|
||||
options.wantsCompileScript(),
|
||||
options.getReportSummaryTo(),
|
||||
String.join("\n", args)
|
||||
);
|
||||
ScriptBuffer buffer = new BasicScriptBuffer()
|
||||
.add(options.getCommands().toArray(new Cmd[0]));
|
||||
|
||||
@@ -76,6 +76,7 @@ public class NBCLIOptions {
|
||||
private static final String REPORT_INTERVAL = "--report-interval";
|
||||
private static final String REPORT_GRAPHITE_TO = "--report-graphite-to";
|
||||
private static final String REPORT_CSV_TO = "--report-csv-to";
|
||||
private static final String REPORT_SUMMARY_TO = "--report-summary-to";
|
||||
private static final String PROGRESS = "--progress";
|
||||
private static final String WITH_LOGGING_PATTERN = "--with-logging-pattern";
|
||||
private static final String LOG_HISTOGRAMS = "--log-histograms";
|
||||
@@ -149,6 +150,7 @@ public class NBCLIOptions {
|
||||
private final List<String> statePathAccesses = new ArrayList<>();
|
||||
private final String hdrForChartFileName = DEFAULT_CHART_HDR_LOG_NAME;
|
||||
private String dockerPromRetentionDays = "183d";
|
||||
private String reportSummaryTo = "stdout:60";
|
||||
|
||||
public String getAnnotatorsConfig() {
|
||||
return annotatorsConfig;
|
||||
@@ -163,6 +165,10 @@ public class NBCLIOptions {
|
||||
return this.dockerPromRetentionDays;
|
||||
}
|
||||
|
||||
public String getReportSummaryTo() {
|
||||
return reportSummaryTo;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
ParseGlobalsOnly,
|
||||
ParseAllOptions
|
||||
@@ -490,6 +496,10 @@ public class NBCLIOptions {
|
||||
arglist.removeFirst();
|
||||
reportCsvTo = arglist.removeFirst();
|
||||
break;
|
||||
case REPORT_SUMMARY_TO:
|
||||
arglist.removeFirst();
|
||||
reportSummaryTo = arglist.removeFirst();
|
||||
break;
|
||||
case LIST_DRIVERS:
|
||||
case LIST_ACTIVITY_TYPES:
|
||||
arglist.removeFirst();
|
||||
@@ -841,5 +851,4 @@ public class NBCLIOptions {
|
||||
return progressSpec;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user