/** * Generates the key to be used for aggregating samples as follows:<br> * <code>sampleLabel</code> "-" <code>[threadName|threadGroup]</code> * <p> * N.B. the key should agree with the fixed items that are saved in the sample. * * @param event sample event whose key is to be calculated * @param keyOnThreadName true if key should use thread name, otherwise use thread group * @return the key to use for aggregating samples */ public static String getKey(SampleEvent event, boolean keyOnThreadName) { StringBuilder sb = new StringBuilder(80); sb.append(event.getResult().getSampleLabel()); if (keyOnThreadName){ sb.append('-').append(event.getResult().getThreadName()); } else { sb.append('-').append(event.getThreadGroup()); } return sb.toString(); } }
.add(new SampleEvent(statResult, e.getThreadGroup()));