mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow --show-stacktraces on bootstrap phase
This commit is contained in:
@@ -42,6 +42,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.locks.LockSupport;
|
import java.util.concurrent.locks.LockSupport;
|
||||||
@@ -68,7 +69,14 @@ public class NBCLI {
|
|||||||
NBCLI cli = new NBCLI("eb");
|
NBCLI cli = new NBCLI("eb");
|
||||||
cli.run(args);
|
cli.run(args);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String error = ScenarioErrorHandler.handle(e, false);
|
boolean showStackTraces = false;
|
||||||
|
for (String arg : args) {
|
||||||
|
if (arg.toLowerCase(Locale.ROOT).equals("--show-stacktraces")) {
|
||||||
|
showStackTraces=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String error = ScenarioErrorHandler.handle(e, showStackTraces);
|
||||||
// Commented for now, as the above handler should do everything needed.
|
// Commented for now, as the above handler should do everything needed.
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
System.err.println("Scenario stopped due to error. See logs for details.");
|
System.err.println("Scenario stopped due to error. See logs for details.");
|
||||||
|
|||||||
@@ -357,6 +357,10 @@ public class NBCLIOptions {
|
|||||||
arglist.removeFirst();
|
arglist.removeFirst();
|
||||||
consoleLoggingPattern = readWordOrThrow(arglist, "logging pattern");
|
consoleLoggingPattern = readWordOrThrow(arglist, "logging pattern");
|
||||||
break;
|
break;
|
||||||
|
case SHOW_STACKTRACES:
|
||||||
|
arglist.removeFirst();
|
||||||
|
showStackTraces = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
nonincludes.addLast(arglist.removeFirst());
|
nonincludes.addLast(arglist.removeFirst());
|
||||||
}
|
}
|
||||||
@@ -440,10 +444,6 @@ public class NBCLIOptions {
|
|||||||
arglist.removeFirst();
|
arglist.removeFirst();
|
||||||
showScript = true;
|
showScript = true;
|
||||||
break;
|
break;
|
||||||
case SHOW_STACKTRACES:
|
|
||||||
arglist.removeFirst();
|
|
||||||
showStackTraces = true;
|
|
||||||
break;
|
|
||||||
case LIST_METRICS:
|
case LIST_METRICS:
|
||||||
arglist.removeFirst();
|
arglist.removeFirst();
|
||||||
arglist.addFirst("start");
|
arglist.addFirst("start");
|
||||||
|
|||||||
Reference in New Issue
Block a user