From 4e60e856bd5c0ac5c48a5a312a263fbec3c343a0 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 14 Apr 2022 22:29:48 +0100 Subject: Fix names for non-combined threads --- .../src/main/java/me/lucko/spark/common/sampler/ThreadGrouper.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spark-common/src/main/java/me') 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 + ")"; } -- cgit