public void run() {
samples = new HashMap<String, Double>();
for (Map.Entry<String, Statistic> statisticEntry : StatisticsManager.getInstance().getAllStatistics()) {
String key = statisticEntry.getKey();
Statistic statistic = statisticEntry.getValue();
// Only sample statistics that keep info of the cluster node and not the entire cluster
if (statistic.isPartialSample()) {
double statSample = sampleStat(key, statistic);
// Store sample result
samples.put(key, statSample);
}
}