ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/CASLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/CASLoops.java (file contents):
Revision 1.4 by jsr166, Thu Oct 29 23:09:07 2009 UTC vs.
Revision 1.8 by jsr166, Mon Dec 5 04:08:46 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea and released to the public domain, as explained at
3 < * http://creativecommons.org/licenses/publicdomain
3 > * http://creativecommons.org/publicdomain/zero/1.0/
4   */
5  
6   /*
# Line 46 | Line 46 | public class CASLoops {
46          if (args.length > 0)
47              maxThreads = Integer.parseInt(args[0]);
48  
49 <        loopIters = new long[maxThreads+1];
49 >        loopIters = new long[maxThreads+1];
50  
51          if (args.length > 1)
52              includeLocks = true;
# Line 569 | Line 569 | public class CASLoops {
569          if (nthreads > NCPUS)
570              t = t * NCPUS / nthreads;
571          System.out.print(LoopHelpers.rightJustify(t));
572 <        double secs = (double)(runtime) / 1000000000.0;
572 >        double secs = (double) runtime / 1000000000.0;
573          System.out.println("\t " + secs + "s run time");
574      }
575  
# Line 579 | Line 579 | public class CASLoops {
579              System.out.println("threads : " + i +
580                                 " base iters per thread per run : " +
581                                 LoopHelpers.rightJustify(loopIters[i]));
582 <        long ntime = runNonAtomic(i,  iters);
582 >        long ntime = runNonAtomic(i, iters);
583          if (print)
584              report("Base        : ", ntime, ntime, i, iters);
585          Thread.sleep(100L);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines