1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.*; |
24 |
|
if (args.length > 0) { |
25 |
|
try { |
26 |
|
mapClass = Class.forName(args[0]); |
27 |
< |
} catch(ClassNotFoundException e) { |
27 |
> |
} catch (ClassNotFoundException e) { |
28 |
|
throw new RuntimeException("Class " + args[0] + " not found."); |
29 |
|
} |
30 |
|
} |
112 |
|
barrier.await(); |
113 |
|
barrier.await(); |
114 |
|
long time = timer.getTime(); |
115 |
< |
long tpo = time / (i * (long)nops); |
115 |
> |
long tpo = time / (i * (long) nops); |
116 |
|
System.out.print(LoopHelpers.rightJustify(tpo) + " ns per op"); |
117 |
< |
double secs = (double)(time) / 1000000000.0; |
117 |
> |
double secs = (double) time / 1000000000.0; |
118 |
|
System.out.println("\t " + secs + "s run time"); |
119 |
|
map.clear(); |
120 |
|
} |