Class N15_Extra_ArrayRandomAccessVersusSize

java.lang.Object
  extended by N15_Extra_ArrayRandomAccessVersusSize

public class N15_Extra_ArrayRandomAccessVersusSize
extends Object

Benchmarks the random access time of an int[] of a specified size.

Author:
Brent Boyer

Nested Class Summary
protected static class N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray
          Identical to a combination of N08_Part2_DataStructureAccess.TaskAbstract and N08_Part2_DataStructureAccess.ArrayAccess except that is customized for random access of an int[] instead of arbitrary access of an Integer[] (the Programmer notes above explain why).
 
Field Summary
protected static List<String> keysLegal
          Specifies all the switch keys which can legally appear as command line arguments to main.
protected static String pathPrefix_key
           
protected static String size_key
           
 
Constructor Summary
N15_Extra_ArrayRandomAccessVersusSize()
           
 
Method Summary
static void main(String[] args)
          Entry point to the functionality offered by this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size_key

protected static final String size_key
See Also:
Constant Field Values

pathPrefix_key

protected static final String pathPrefix_key
See Also:
Constant Field Values

keysLegal

protected static final List<String> keysLegal
Specifies all the switch keys which can legally appear as command line arguments to main.

Constructor Detail

N15_Extra_ArrayRandomAccessVersusSize

public N15_Extra_ArrayRandomAccessVersusSize()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Entry point to the functionality offered by this class.

Results on 2009-04-05 on my 2.5 GHz Intel Xeon E5420 machine (server jvm) are in the .../results/newPostArticleResults/cacheSizes directory.

Parameters:
args - must be non-null and have exactly 4 elements; these 4 elements must consist of these 2 command line switches (name/value pairs); the switches may be in any order: -size [the number of elements in the data structure, as an int], -pathPrefix [valid file system path prefix; the final part of the file name will be generated by this class]
Throws:
Exception - (or some subclass) if any problem happens