From: jjenista Date: Tue, 30 Nov 2010 23:42:43 +0000 (+0000) Subject: we changed the micro benchmark, but why, to get the tasks out of the main method? X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0e61e256694e2ef95612a31cd47a6d2b388ef0f3;p=IRC.git we changed the micro benchmark, but why, to get the tasks out of the main method? --- diff --git a/Robust/src/Benchmarks/oooJava/micro/test.java b/Robust/src/Benchmarks/oooJava/micro/test.java index 69fd2f7b..e8c9fd7e 100644 --- a/Robust/src/Benchmarks/oooJava/micro/test.java +++ b/Robust/src/Benchmarks/oooJava/micro/test.java @@ -3,43 +3,30 @@ public class test { public static void main( String argv[] ) { long count = 500000; + int x=1; if( argv.length > 0 ) { count = count * Integer.parseInt( argv[0] ); } - - long s = System.currentTimeMillis(); - long e1; - long e2; + + if( argv.length > 1 ) { + x = Integer.parseInt( argv[1] ); + } + mytest(count, x); + } - rblock parent { - long x = 3; - long y = 0; + static void mytest(long count, int x) { + for( long i = 0; i < count; i++ ) { - for( long i = 0; i < count; i++ ) { - - // the parent does a simple variable copy - // into this child's record at issue because - // the value is definitely available, the - // child needs the value read-only - rblock child { - if( x + 4 == -9 ) { - } - } + // the parent does a simple variable copy + // into this child's record at issue because + // the value is definitely available, the + // child needs the value read-only + rblock child { + for(int j=0;j