aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/command
diff options
context:
space:
mode:
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
index 7b456ac..6ebbee1 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java
@@ -57,6 +57,7 @@ public class SamplerModule<S> implements CommandModule<S> {
.argumentUsage("timeout", "timeout seconds")
.argumentUsage("thread", "thread name")
.argumentUsage("regex", null)
+ .argumentUsage("combine-all", null)
.argumentUsage("not-combined", null)
.argumentUsage("interval", "interval millis")
.argumentUsage("only-ticks-over", "tick length millis")
@@ -96,7 +97,9 @@ public class SamplerModule<S> implements CommandModule<S> {
}
ThreadGrouper threadGrouper;
- if (arguments.boolFlag("not-combined")) {
+ if (arguments.boolFlag("combine-all")) {
+ threadGrouper = ThreadGrouper.AS_ONE;
+ } else if (arguments.boolFlag("not-combined")) {
threadGrouper = ThreadGrouper.BY_NAME;
} else {
threadGrouper = ThreadGrouper.BY_POOL;
@@ -171,7 +174,7 @@ public class SamplerModule<S> implements CommandModule<S> {
}
})
.tabCompleter((platform, sender, arguments) -> {
- List<String> opts = new ArrayList<>(Arrays.asList("--timeout", "--regex",
+ List<String> opts = new ArrayList<>(Arrays.asList("--timeout", "--regex", "--combine-all",
"--not-combined", "--interval", "--only-ticks-over", "--include-line-numbers"));
opts.removeAll(arguments);
opts.add("--thread"); // allowed multiple times