Skip to content

Commit ce9f3a4

Browse files
committed
add bench for getMulti
1 parent 33cc4ed commit ce9f3a4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/com/danga/MemCached/test/MemCachedBench.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ public static void main(String[] args) {
8181
time = end - begin;
8282
System.out.println(runs + " gets: " + time + "ms");
8383

84+
String[] keys = new String[ runs ];
85+
int j = 0;
86+
for (int i = start; i < start+runs; i++) {
87+
keys[ j ] = keyBase + i;
88+
j++;
89+
}
90+
begin = System.currentTimeMillis();
91+
Map vals = mc.getMulti( keys );
92+
end = System.currentTimeMillis();
93+
time = end - begin;
94+
System.out.println(runs + " getMulti: " + time + "ms");
95+
8496
begin = System.currentTimeMillis();
8597
for (int i = start; i < start+runs; i++) {
8698
mc.delete( keyBase + i );

0 commit comments

Comments
 (0)