I am trying to measure the performance of Database Insert. I have captured all those performance numbers in a ConcurrentHashMap named map. In that concurrent hash map it will be something like this.
And that map will have lot more data means lot more key value pair.
So now I am trying to do something like this by using the same concurrenthashmap above-
How many calls(X number) came back in between 1 and 20 ms
How many calls(X number) came back in between 20 and 40 ms
How many calls(X number) came back in between 40 and 60 ms
How many calls(X number) came back in between 60 and 80 ms
How many calls(X number) came back in between 80 and 100 ms
How many calls(X number) came back after 100 ms
Can anyone help me here?
Key- 11 Value- 2 So that means, 2 Calls came back in 11 ms. Another example below
Key - 30 Value -1 which means, 1 Call came back in 30 ms.
And that map will have lot more data means lot more key value pair.
So now I am trying to do something like this by using the same concurrenthashmap above-
How many calls(X number) came back in between 1 and 20 ms
How many calls(X number) came back in between 20 and 40 ms
How many calls(X number) came back in between 40 and 60 ms
How many calls(X number) came back in between 60 and 80 ms
How many calls(X number) came back in between 80 and 100 ms
How many calls(X number) came back after 100 ms
SortedSet<Long> keys = new TreeSet<Long>(map.keySet()); for (Long key : keys) { System.out.print(key + " : "); for (int i = 0; i < map.get(key); i++) { // Not sure what I am supposed to do here? } System.out.println(); }
Can anyone help me here?