aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/sampler
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-04-14 22:29:48 +0100
committerLuck <git@lucko.me>2022-04-14 22:29:48 +0100
commit4e60e856bd5c0ac5c48a5a312a263fbec3c343a0 (patch)
tree4d6f86de77c5ba5113591920140ce3c92d839b67 /spark-common/src/main/java/me/lucko/spark/common/sampler
parent8a586bdf08f07c4379ccdb96cfb35af36d719d00 (diff)
downloadspark-4e60e856bd5c0ac5c48a5a312a263fbec3c343a0.tar.gz
spark-4e60e856bd5c0ac5c48a5a312a263fbec3c343a0.tar.bz2
spark-4e60e856bd5c0ac5c48a5a312a263fbec3c343a0.zip
Fix names for non-combined threads
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/sampler')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java
index f71ad9f..9ad84df 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java
@@ -90,6 +90,9 @@ public interface ThreadGrouper {
@Override
public String getLabel(String group) {
int count = this.seen.getOrDefault(group, Collections.emptySet()).size();
+ if (count == 0) {
+ return group;
+ }
return group + " (x" + count + ")";
}