com.googlecode.compressingcircularbuffers
Class CompressingCircularBufferTester

java.lang.Object
  extended by com.googlecode.compressingcircularbuffers.CompressingCircularBufferTester

public class CompressingCircularBufferTester
extends java.lang.Object


Constructor Summary
CompressingCircularBufferTester()
           
 
Method Summary
static void main(java.lang.String[] args)
          Tests the CompressingCircularBuffer facility, and then runs the timingTest method.
static void timingTest()
          Compares performance of CompressingCircularBuffers to SimpleCompressingBuffers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressingCircularBufferTester

public CompressingCircularBufferTester()
Method Detail

timingTest

public static void timingTest()
Compares performance of CompressingCircularBuffers to SimpleCompressingBuffers.

This code was used to generate the performance comparison in the article; it calculates the O(n) worst case update times of the simple method, and validates that average case update times are O(1) (and about the same) for both methods--used to check that the CCB method does not add an unacceptably large fixed cost due to its more complicated indexing. Note: you may need to add a java command line (VM) argument to increase the heap such as 'java -Xmx1000000000' if you get an error about not enough heap space when running this test.


main

public static void main(java.lang.String[] args)
Tests the CompressingCircularBuffer facility, and then runs the timingTest method.