// List of value by sampler
Map<Long, StatCalculatorLong> subList = pList.get(sampleLabel);
final Long startTimeIntervalLong = Long.valueOf(startTimeInterval);
if (subList != null) {
long respTime = sampleResult.getTime();
StatCalculatorLong value = subList.get(startTimeIntervalLong);
if (value==null) {
value = new StatCalculatorLong();
subList.put(startTimeIntervalLong, value);
}
value.addValue(respTime, 1);
} else {
// We want to retain insertion order, so LinkedHashMap is necessary
Map<Long, StatCalculatorLong> newSubList = new LinkedHashMap<Long, StatCalculatorLong>(5);
StatCalculatorLong helper = new StatCalculatorLong();
helper.addValue(Long.valueOf(sampleResult.getTime()),1);
newSubList.put(startTimeIntervalLong, helper);
pList.put(sampleLabel, newSubList);
}
}
}