/* * RandomTest.java * * Created on February 25, 2003, 3:12 PM */ import java.util.Random; /** * * @author dagastin */ public class LongTest { long longArray[]; long sums; long sumTest; int threadCount; int arraySize; int loopCount; /** Creates a new instance of RandomTest */ public LongTest(String arg2, String arg3,boolean showOutput) { arraySize=Integer.parseInt(arg2); loopCount=Integer.parseInt(arg3); long start = 123456L; sumTest = 123496L; longArray=new long[arraySize]; for ( int y=0; y Elapsed Time = " + (stopTime-startTime)); } /** * @param args the command line arguments */ public static void main(String[] args) { //for now there are two arguments // * Argument 1: Number of threads to test // * Argument 2: Number of iterations performed by each thread if(args.length == 2){ LongTest staticTest1= new LongTest(args[0],args[1],false); LongTest staticTest2= new LongTest(args[0],args[1],true); } else { System.out.println("Usage: java LongTest {Array Size} {Number of Interations}"); } } public void testMethod() { for(int i=0;i