commit micro benchmarks for later experiments
[IRC.git] / Robust / src / Benchmarks / oooJava / micro / test.java
1 public class test {
2
3         public static void main(String argv[]) {
4
5             long x=0;
6             long count=500000;
7
8             if(argv.length>0){
9                 count=count * Integer.parseInt(argv[0]);
10             }
11             
12             long s=System.currentTimeMillis();
13
14             for(long i=0;i<count;i++){
15                 rblock rchild{
16                     x++;
17                     for(int j=0;j<1000;j++) {
18                       x++;x--;
19                     }
20                 }
21             }
22
23             long e1=System.currentTimeMillis();
24             System.out.println( "x="+x );
25             long e2=System.currentTimeMillis();
26
27             double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
28             double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
29             System.out.println( "dt1="+dt1+"s" );
30             System.out.println( "dt2="+dt2+"s" );
31         }
32
33 }