remove graaljs compat flag

This commit is contained in:
Jonathan Shook 2022-09-09 11:08:37 -05:00
parent 7a83f2779f
commit 69255d5e71
4 changed files with 5 additions and 26 deletions

View File

@ -425,7 +425,6 @@ public class NBCLI implements Function<String[], Integer> {
options.getScriptFile(),
options.getScriptingEngine(),
options.getProgressSpec(),
options.wantsGraaljsCompatMode(),
options.wantsStackTraces(),
options.wantsCompileScript(),
options.getReportSummaryTo(),

View File

@ -121,8 +121,6 @@ public class NBCLIOptions {
private static final String DOCKER_PROM_RETENTION_DAYS = "--docker-prom-retention-days";
private static final String GRAALJS_ENGINE = "--graaljs";
private static final String NASHORN_ENGINE = "--nashorn";
private static final String GRAALJS_COMPAT = "--graaljs-compat";
private static final String DEFAULT_CONSOLE_PATTERN = "TERSE";
private static final String DEFAULT_LOGFILE_PATTERN = "VERBOSE";
@ -168,7 +166,6 @@ public class NBCLIOptions {
private boolean wantsWorkloadsList = false;
private final List<String> wantsToIncludePaths = new ArrayList<>();
private Scenario.Engine engine = Scenario.Engine.Graalvm;
private boolean graaljs_compat = false;
private int hdr_digits = 3;
private String docker_grafana_tag = "7.3.4";
private String docker_prom_tag = "latest";
@ -509,17 +506,10 @@ public class NBCLIOptions {
String word = arglist.peekFirst();
switch (word) {
case GRAALJS_COMPAT:
graaljs_compat = true;
arglist.removeFirst();
break;
case GRAALJS_ENGINE:
engine = Scenario.Engine.Graalvm;
arglist.removeFirst();
break;
case NASHORN_ENGINE:
throw new RuntimeException("The nashorn engine has been deprecated in this major version of " +
"NoSQLBench");
case COMPILE_SCRIPT:
arglist.removeFirst();
compileScript = true;
@ -686,10 +676,6 @@ public class NBCLIOptions {
return engine;
}
public boolean wantsGraaljsCompatMode() {
return graaljs_compat;
}
public List<LoggerConfigData> getHistoLoggerConfigs() {
List<LoggerConfigData> configs =
histoLoggerConfigs.stream().map(LoggerConfigData::new).collect(Collectors.toList());

View File

@ -83,7 +83,6 @@ public class Scenario implements Callable<ScenarioResult> {
private ScenarioController scenarioController;
private ActivityProgressIndicator activityProgressIndicator;
private String progressInterval = "console:1m";
private boolean wantsGraaljsCompatMode;
private ScenarioContext scriptEnv;
private final String scenarioName;
private ScriptParams scenarioScriptParams;
@ -103,7 +102,6 @@ public class Scenario implements Callable<ScenarioResult> {
String scriptfile,
Engine engine,
String progressInterval,
boolean wantsGraaljsCompatMode,
boolean wantsStackTraces,
boolean wantsCompiledScript,
String reportSummaryTo,
@ -115,7 +113,6 @@ public class Scenario implements Callable<ScenarioResult> {
this.scriptfile = scriptfile;
this.engine = engine;
this.progressInterval = progressInterval;
this.wantsGraaljsCompatMode = wantsGraaljsCompatMode;
this.wantsStackTraces = wantsStackTraces;
this.wantsCompiledScript = wantsCompiledScript;
this.reportSummaryTo = reportSummaryTo;
@ -204,15 +201,13 @@ public class Scenario implements Callable<ScenarioResult> {
scriptEngine.put("params", scenarioScriptParams);
if (wantsGraaljsCompatMode) {
scriptEngine.put("scenario", scenarioController);
scriptEngine.put("metrics", new PolyglotMetricRegistryBindings(metricRegistry));
scriptEngine.put("activities", new NashornActivityBindings(scenarioController));
} else {
// scriptEngine.put("scenario", scenarioController);
// scriptEngine.put("metrics", new PolyglotMetricRegistryBindings(metricRegistry));
// scriptEngine.put("activities", new NashornActivityBindings(scenarioController));
scriptEngine.put("scenario", new PolyglotScenarioController(scenarioController));
scriptEngine.put("metrics", new PolyglotMetricRegistryBindings(metricRegistry));
scriptEngine.put("activities", new NashornActivityBindings(scenarioController));
}
for (ScriptingPluginInfo<?> extensionDescriptor : SandboxExtensionFinder.findAll()) {
if (!extensionDescriptor.isAutoLoading()) {

View File

@ -134,8 +134,7 @@ public class ScenarioExecutorEndpoint implements WebServiceObject {
"",
Scenario.Engine.Graalvm,
"disabled",
false,
true,
true,
false,
"",
cmdList.toString(),