} else if (configName.toLowerCase().endsWith("mean")) {
final String tag = configName.substring(0, configName.length() - "mean".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
toAppend.append((timingStats == null) ? "" : timingStats.getMean());
}
};
} else if (configName.toLowerCase().endsWith("min")) {
final String tag = configName.substring(0, configName.length() - "min".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
toAppend.append((timingStats == null) ? "" : timingStats.getMin());
}
};
} else if (configName.toLowerCase().endsWith("max")) {
final String tag = configName.substring(0, configName.length() - "max".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
toAppend.append((timingStats == null) ? "" : timingStats.getMax());
}
};
} else if (configName.toLowerCase().endsWith("stddev")) {
final String tag = configName.substring(0, configName.length() - "stddev".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
toAppend.append((timingStats == null) ? "" : timingStats.getStandardDeviation());
}
};
} else if (configName.toLowerCase().endsWith("count")) {
final String tag = configName.substring(0, configName.length() - "count".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
toAppend.append((timingStats == null) ? "" : timingStats.getCount());
}
};
} else if (configName.toLowerCase().endsWith("tps")) {
final String tag = configName.substring(0, configName.length() - "tps".length());
return new GroupedTimingStatisticsValueRetriever() {
public void appendValue(String start, String stop, long windowLength,
GroupedTimingStatistics stats, StringBuilder toAppend) {
TimingStatistics timingStats = stats.getStatisticsByTag().get(tag);
if (timingStats == null) {
toAppend.append("");
} else {
toAppend.append((timingStats.getCount() * 1000.0) / windowLength);
}
}
};
} else {
throw new IllegalArgumentException("Unknown CSV format config string: " + configName);