diff options
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/sampler')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/sampler/ThreadGrouper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/sampler/ThreadGrouper.java b/spark-common/src/main/java/me/lucko/spark/sampler/ThreadGrouper.java index 72cd4dc..031d7c1 100644 --- a/spark-common/src/main/java/me/lucko/spark/sampler/ThreadGrouper.java +++ b/spark-common/src/main/java/me/lucko/spark/sampler/ThreadGrouper.java @@ -45,9 +45,12 @@ public interface ThreadGrouper { /** * Implementation of {@link ThreadGrouper} that attempts to group by the name of the pool * the thread originated from. + * + * <p>The regex pattern used to match pools expects a digit at the end of the thread name, + * separated from the pool name with any of one or more of ' ', '-', or '#'.</p> */ ThreadGrouper BY_POOL = new ThreadGrouper() { - private final Pattern pattern = Pattern.compile("^(.*)[-#] ?\\d+$"); + private final Pattern pattern = Pattern.compile("^(.*?)[-# ]+\\d+$"); @Override public String getGroup(String threadName) { |