Changeset 512 for Tests


Ignore:
Timestamp:
03/28/12 15:07:41 (10 years ago)
Author:
BegemoT
Message:
 
Location:
Tests/JAVA/test/src/main/java/test/threads/queue/unstressed
Files:
1 edited
4 moved

Legend:

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

    r494 r512  
    141141                case 4: 
    142142                    task = new QueueBenchmarkingTask( 
    143                             CABSESDMaskedQueueUnrolled.<LongValueEntry>factory(), 
     143                            CABSESDMaskedUnrolledQueue.<LongValueEntry>factory(), 
    144144                            size, 
    145145                            eventFactory, 
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/CABSESDLazySetPaddedUnrolledQueue.java

    r510 r512  
    1414 * @since 27.09.11,  14:58 
    1515 */ 
    16 public class CABSESDLazySetPaddedQueueUnrolled<T> implements IQueue<T> { 
     16public class CABSESDLazySetPaddedUnrolledQueue<T> implements IQueue<T> { 
    1717    private static final boolean USE_BITMASK = true; 
    1818    //====================================================== 
    19     private static final AtomicLongFieldUpdater<CABSESDLazySetPaddedQueueUnrolled> tailUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetPaddedQueueUnrolled.class, "tailCursor" ); 
    20     private static final AtomicLongFieldUpdater<CABSESDLazySetPaddedQueueUnrolled> headUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetPaddedQueueUnrolled.class, "headCursor" ); 
     19    private static final AtomicLongFieldUpdater<CABSESDLazySetPaddedUnrolledQueue> tailUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetPaddedUnrolledQueue.class, "tailCursor" ); 
     20    private static final AtomicLongFieldUpdater<CABSESDLazySetPaddedUnrolledQueue> headUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetPaddedUnrolledQueue.class, "headCursor" ); 
    2121    //====================================================== 
    2222 
     
    4848 
    4949 
    50     public CABSESDLazySetPaddedQueueUnrolled( final int length ) { 
     50    public CABSESDLazySetPaddedUnrolledQueue( final int length ) { 
    5151        checkArgument( length > 0, "length(%s) must be >0", length ); 
    5252        if ( USE_BITMASK ) { 
     
    133133 
    134134    @SuppressWarnings( "unchecked" ) 
    135     public static <T> IBoundedQueueFactory<T, CABSESDLazySetPaddedQueueUnrolled<T>> factory() { 
     135    public static <T> IBoundedQueueFactory<T, CABSESDLazySetPaddedUnrolledQueue<T>> factory() { 
    136136        return FACTORY; 
    137137    } 
    138138 
    139     public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDLazySetPaddedQueueUnrolled<Object>>() { 
     139    public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDLazySetPaddedUnrolledQueue<Object>>() { 
    140140        @Override 
    141         public CABSESDLazySetPaddedQueueUnrolled<Object> create( final int size ) { 
    142             return new CABSESDLazySetPaddedQueueUnrolled<Object>( size ); 
     141        public CABSESDLazySetPaddedUnrolledQueue<Object> create( final int size ) { 
     142            return new CABSESDLazySetPaddedUnrolledQueue<Object>( size ); 
    143143        } 
    144144 
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/CABSESDLazySetUnrolledQueue.java

    r508 r512  
    1414 * @since 27.09.11,  14:58 
    1515 */ 
    16 public class CABSESDLazySetQueueUnrolled<T> implements IQueue<T> { 
     16public class CABSESDLazySetUnrolledQueue<T> implements IQueue<T> { 
    1717    private static final boolean USE_BITMASK = true; 
    1818    //====================================================== 
    19     private static final AtomicLongFieldUpdater<CABSESDLazySetQueueUnrolled> tailUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetQueueUnrolled.class, "tailCursor" ); 
    20     private static final AtomicLongFieldUpdater<CABSESDLazySetQueueUnrolled> headUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetQueueUnrolled.class, "headCursor" ); 
     19    private static final AtomicLongFieldUpdater<CABSESDLazySetUnrolledQueue> tailUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetUnrolledQueue.class, "tailCursor" ); 
     20    private static final AtomicLongFieldUpdater<CABSESDLazySetUnrolledQueue> headUpdater = AtomicLongFieldUpdater.newUpdater( CABSESDLazySetUnrolledQueue.class, "headCursor" ); 
    2121    //====================================================== 
    2222 
     
    4949 
    5050 
    51     public CABSESDLazySetQueueUnrolled( final int length ) { 
     51    public CABSESDLazySetUnrolledQueue( final int length ) { 
    5252        checkArgument( length > 0, "length(%s) must be >0", length ); 
    5353        if ( USE_BITMASK ) { 
     
    134134 
    135135    @SuppressWarnings( "unchecked" ) 
    136     public static <T> IBoundedQueueFactory<T, CABSESDLazySetQueueUnrolled<T>> factory() { 
     136    public static <T> IBoundedQueueFactory<T, CABSESDLazySetUnrolledQueue<T>> factory() { 
    137137        return FACTORY; 
    138138    } 
    139139 
    140     public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDLazySetQueueUnrolled<Object>>() { 
     140    public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDLazySetUnrolledQueue<Object>>() { 
    141141        @Override 
    142         public CABSESDLazySetQueueUnrolled<Object> create( final int size ) { 
    143             return new CABSESDLazySetQueueUnrolled<Object>( size ); 
     142        public CABSESDLazySetUnrolledQueue<Object> create( final int size ) { 
     143            return new CABSESDLazySetUnrolledQueue<Object>( size ); 
    144144        } 
    145145 
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/CABSESDMaskedUnrolledQueue.java

    r485 r512  
    2727 * @since 13.10.11,  15:06 
    2828 */ 
    29 public final class CABSESDMaskedQueueUnrolled<T> implements IQueue<T> { 
     29public final class CABSESDMaskedUnrolledQueue<T> implements IQueue<T> { 
    3030    private static final boolean USE_TEST_AND_SET = false; 
    3131    private static final boolean USE_UNSAFE = true; 
     
    5858    public volatile long $h01, $h02, $h03, $h04, $h05, $h06, $h07, $h08; 
    5959 
    60     private static final AtomicLongFieldUpdater<CABSESDMaskedQueueUnrolled> tailUpdater = AtomicLongFieldUpdater.newUpdater( 
    61             CABSESDMaskedQueueUnrolled.class, 
     60    private static final AtomicLongFieldUpdater<CABSESDMaskedUnrolledQueue> tailUpdater = AtomicLongFieldUpdater.newUpdater( 
     61            CABSESDMaskedUnrolledQueue.class, 
    6262            "tailCursor" 
    6363    ); 
    64     private static final AtomicLongFieldUpdater<CABSESDMaskedQueueUnrolled> headUpdater = AtomicLongFieldUpdater.newUpdater( 
    65             CABSESDMaskedQueueUnrolled.class, 
     64    private static final AtomicLongFieldUpdater<CABSESDMaskedUnrolledQueue> headUpdater = AtomicLongFieldUpdater.newUpdater( 
     65            CABSESDMaskedUnrolledQueue.class, 
    6666            "headCursor" 
    6767    ); 
     
    7373    static { 
    7474        unsafe = UnsafeHelper.unsafe(); 
    75         final Class<CABSESDMaskedQueueUnrolled> clazz = CABSESDMaskedQueueUnrolled.class; 
     75        final Class<CABSESDMaskedUnrolledQueue> clazz = CABSESDMaskedUnrolledQueue.class; 
    7676        try { 
    7777            final Field headCursorField = clazz.getDeclaredField( "headCursor" ); 
     
    8484        System.out.printf( 
    8585                "%s: useUnsafe: %b, useTAS: %b\n", 
    86                 CABSESDMaskedQueueUnrolled.class.getSimpleName(), 
     86                CABSESDMaskedUnrolledQueue.class.getSimpleName(), 
    8787                USE_UNSAFE, 
    8888                USE_TEST_AND_SET 
     
    9191 
    9292    @SuppressWarnings( "unchecked" ) 
    93     public CABSESDMaskedQueueUnrolled( final int size ) { 
     93    public CABSESDMaskedUnrolledQueue( final int size ) { 
    9494        if ( Integer.bitCount( size ) != 1 ) { 
    9595            throw new IllegalArgumentException( "bufferSize must be a power of 2" ); 
     
    169169    } 
    170170 
    171     public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDMaskedQueueUnrolled<Object>>() { 
     171    public static final IBoundedQueueFactory FACTORY = new IBoundedQueueFactory<Object, CABSESDMaskedUnrolledQueue<Object>>() { 
    172172        @Override 
    173         public CABSESDMaskedQueueUnrolled<Object> create( final int size ) { 
    174             return new CABSESDMaskedQueueUnrolled<Object>( size ); 
     173        public CABSESDMaskedUnrolledQueue<Object> create( final int size ) { 
     174            return new CABSESDMaskedUnrolledQueue<Object>( size ); 
    175175        } 
    176176 
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/SESDSequencerUnrolled.java

    r482 r512  
    1212 * @since 27.09.11,  14:58 
    1313 */ 
    14 public class SESDSequencer2 { 
     14public class SESDSequencerUnrolled { 
    1515    //====================================================== 
    16     private static final AtomicLongFieldUpdater<SESDSequencer2> tailUpdater = AtomicLongFieldUpdater.newUpdater( SESDSequencer2.class, "tailCursor" ); 
    17     private static final AtomicLongFieldUpdater<SESDSequencer2> headUpdater = AtomicLongFieldUpdater.newUpdater( SESDSequencer2.class, "headCursor" ); 
     16    private static final AtomicLongFieldUpdater<SESDSequencerUnrolled> tailUpdater = AtomicLongFieldUpdater.newUpdater( SESDSequencerUnrolled.class, "tailCursor" ); 
     17    private static final AtomicLongFieldUpdater<SESDSequencerUnrolled> headUpdater = AtomicLongFieldUpdater.newUpdater( SESDSequencerUnrolled.class, "headCursor" ); 
    1818    //====================================================== 
    1919 
     
    4747    } 
    4848 
    49     public SESDSequencer2( final int length ) { 
     49    public SESDSequencerUnrolled( final int length ) { 
    5050        checkArgument( length > 0, "length(%s) must be >0", length ); 
    5151        this.length = length; 
Note: See TracChangeset for help on using the changeset viewer.