Changeset 534 for Tests


Ignore:
Timestamp:
04/03/12 22:05:48 (10 years ago)
Author:
BegemoT
Message:
 
Location:
Tests/JAVA/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Tests/JAVA/test/config.properties.template

    r523 r534  
    2222disruptor.wait-strategy     = com.lmax.disruptor.BusySpinWaitStrategy 
    2323disruptor.publish-in-batch  = false 
     24disruptor.subscribe-in-batch  = true 
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/DisruptorTask.java

    r533 r534  
    2222    private final WaitStrategy waitStrategy; 
    2323    private final boolean publishInBatch; 
    24     private final boolean subsribeInBatch; 
     24    private final boolean subscribeInBatch; 
    2525 
    2626    public DisruptorTask( final Config config ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { 
     
    3333 
    3434        this.publishInBatch = config.getAsBoolean( "disruptor.publish-in-batch", false ); 
    35         this.subsribeInBatch = config.getAsBoolean( "disruptor.subscribe-in-batch", true ); 
     35        this.subscribeInBatch = config.getAsBoolean( "disruptor.subscribe-in-batch", true ); 
    3636    } 
    3737 
     
    6868 
    6969        long sum = 0; 
    70         if ( subsribeInBatch ) { 
     70        if ( subscribeInBatch ) { 
    7171            long nextSequence = lastSequence.get() + 1L; 
    7272            while ( nextSequence <= maxSequence ) { 
     
    112112    public String toString() { 
    113113        return String.format( 
    114                 "%s[%d][%s][%s]", 
     114                "%s[%d][%s][publish:%s][subscribe:%s]", 
    115115                getClass().getSimpleName(), 
    116116                bufferSize(), 
    117117                waitStrategy.getClass().getSimpleName(), 
    118                 ( publishInBatch ) ? ( "batching" ) : ( "no-batching" ) 
     118                ( publishInBatch ) ? ( "batch" ) : ( "no-batch" ), 
     119                ( subscribeInBatch ) ? ( "batch" ) : ( "no-batch" ) 
    119120        ); 
    120121    } 
Note: See TracChangeset for help on using the changeset viewer.