| 77 | } |
| 78 | |
| 79 | private static void printSendStats(long counter, int messageSize) { |
| 80 | float cnt = counter; |
| 81 | float size = messageSize; |
| 82 | float time = (System.currentTimeMillis() - messageStartSendTime) / 1000f; |
| 83 | log.info("****SEND STATS-" + Thread.currentThread().getName() + "*****" + "\n\tMessage count:" + counter + |
| 84 | "\n\tTotal bytes :" + (long) (size * cnt) + "\n\tTotal seconds:" + (time) + "\n\tBytes/second :" + |
| 85 | (size * cnt / time) + "\n\tMBytes/second:" + (size * cnt / time / 1024f / 1024f)); |
| 86 | } |
| 87 | |
| 88 | |
| 89 | public LoadTest(ManagedChannel channel, boolean send, int msgCount, boolean debug, long pause, int stats, |