private Map<StatisticsType, Set<Statistics>> initAllStatistics() throws InterruptedException { assertTrue(this.statSampler.waitForInitialization(5000)); Map<StatisticsType, Set<Statistics>> statsTypeToStats = new HashMap<StatisticsType, Set<Statistics>>(); Statistics[] stats = this.statSampler.getStatistics(); for (int i = 0; i < stats.length; i++) { StatisticsType statsType = stats[i].getType(); Set<Statistics> statsSet = statsTypeToStats.get(statsType); if (statsSet == null) { statsSet = new HashSet<Statistics>(); statsSet.add(stats[i]); statsTypeToStats.put(statsType, statsSet); } else { statsSet.add(stats[i]); } } return statsTypeToStats; }
waitForInitialization(INITIALIZATION_TIMEOUT_MILLIS); } catch (InterruptedException e) { Thread.currentThread().interrupt();
waitForInitialization(INITIALIZATION_TIMEOUT_MILLIS); } catch (InterruptedException e) { Thread.currentThread().interrupt();