Reformat all files in the project according to java conventions.
This commit is contained in:
@@ -10,30 +10,30 @@ public class ShardedBenchmark {
|
||||
private static final int TOTAL_OPERATIONS = 10000000;
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException,
|
||||
IOException {
|
||||
IOException {
|
||||
|
||||
long begin = Calendar.getInstance().getTimeInMillis();
|
||||
long begin = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
for (int n = 0; n <= TOTAL_OPERATIONS; n++) {
|
||||
String key = "foo" + n;
|
||||
Hashing.MD5.hash(key);
|
||||
}
|
||||
for (int n = 0; n <= TOTAL_OPERATIONS; n++) {
|
||||
String key = "foo" + n;
|
||||
Hashing.MD5.hash(key);
|
||||
}
|
||||
|
||||
long elapsed = Calendar.getInstance().getTimeInMillis() - begin;
|
||||
long elapsed = Calendar.getInstance().getTimeInMillis() - begin;
|
||||
|
||||
System.out.println(((1000 * TOTAL_OPERATIONS) / elapsed) + " MD5 ops");
|
||||
System.out.println(((1000 * TOTAL_OPERATIONS) / elapsed) + " MD5 ops");
|
||||
|
||||
begin = Calendar.getInstance().getTimeInMillis();
|
||||
begin = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
for (int n = 0; n <= TOTAL_OPERATIONS; n++) {
|
||||
String key = "foo" + n;
|
||||
Hashing.MURMUR_HASH.hash(key);
|
||||
}
|
||||
for (int n = 0; n <= TOTAL_OPERATIONS; n++) {
|
||||
String key = "foo" + n;
|
||||
Hashing.MURMUR_HASH.hash(key);
|
||||
}
|
||||
|
||||
elapsed = Calendar.getInstance().getTimeInMillis() - begin;
|
||||
elapsed = Calendar.getInstance().getTimeInMillis() - begin;
|
||||
|
||||
System.out.println(((1000 * TOTAL_OPERATIONS) / elapsed)
|
||||
+ " Murmur ops");
|
||||
System.out.println(((1000 * TOTAL_OPERATIONS) / elapsed)
|
||||
+ " Murmur ops");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user