ServerStatisticManager { public void addMessageSize(String domain, int size) { getCurrentStatistic().addMessageSize(domain, size); }  void addBlockLoss(long total); void addBlockTime(long total); void addBlockTotal(long total); void addMessageDump(long total); void addMessageDumpLoss(long total); void addMessageSize(String domain, int size); void addMessageTotal(long total); void addMessageTotal(String domain, long total); void addMessageTotalLoss(long total); void addMessageTotalLoss(String domain, long total); void addNetworkTimeError(long total); void addPigeonTimeError(long total); void addProcessDelay(double delay); Statistic findOrCreateState(long time); void removeState(long time); public ServerStatistic m_serverState; }
@Test public void testPerformance() { ServerStatisticManager manager = new ServerStatisticManager(); for (int i = 0; i < 100000000; i++) { manager.addMessageSize("cat", 30); } }