Changeset 540 for Tests


Ignore:
Timestamp:
04/10/12 09:10:27 (10 years ago)
Author:
BegemoT
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/DisruptorTask.java

    r539 r540  
    7979                                             final int measurements ) throws Exception { 
    8080        sumBeforeGaps = sumAfterGaps = gapsMeasured = 0; 
    81         return super.executeImpl( millisToBogus, millisToMeasure, measurements ); 
     81 
     82        final BenchmarkResult[] results = super.executeImpl( millisToBogus, millisToMeasure, measurements ); 
     83 
     84        System.out.printf( 
     85                "|b-gap|=%.2f, |a-gap|=%.2f, gaps=%d\n", 
     86                ( sumBeforeGaps * 1.0 / gapsMeasured ), 
     87                ( sumAfterGaps * 1.0 / gapsMeasured ), 
     88                gapsMeasured 
     89        ); 
     90 
     91        return results; 
    8292    } 
    8393 
     
    125135    public int workersRequired() { 
    126136        return 1; 
    127     } 
    128  
    129  
    130     @Override 
    131     public void terminate() { 
    132         super.terminate(); 
    133  
    134         System.out.printf( 
    135                 "|b-gap|=%.2f, |a-gap|=%.2f, gaps=%d\n", 
    136                 ( sumBeforeGaps * 1.0 / gapsMeasured ), 
    137                 ( sumAfterGaps * 1.0 / gapsMeasured ), 
    138                 gapsMeasured 
    139         ); 
    140137    } 
    141138 
Note: See TracChangeset for help on using the changeset viewer.