}
}
private void addThreadGroupRecord(String threadGroupName, long time, int numThreads, long duration) {
String labelAgg = "Overall Active Threads";
AbstractGraphRow row = model.get(threadGroupName);
AbstractGraphRow rowAgg = modelAggregate.get(labelAgg);
if (row == null) {
row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, threadGroupName, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, true);
}
if (rowAgg == null) {
rowAgg = getNewRow(modelAggregate, AbstractGraphRow.ROW_SIMPLE, labelAgg, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, Color.RED, true);
}
row.add(time, numThreads);
//rebuild is a heavy process, avoided if possible
if (model.size() == 1) {
log.debug(row.toString());
log.debug(row.getElement(time).toString());
rowAgg.add(time, row.getElement(time).getValue());
} else {
rowAgg.add(time, getAllThreadCount(time));
//handle 3rd and more jtl reload, the time are reset to start time, so we
//invalidate lastAggUpdateTime
if (time < lastAggUpdateTime) {
lastAggUpdateTime = time - duration;