/* * LoadGenerator.java * * Created on August 19, 2004, 2:59 PM */ package test; /** * * @author anovak */ public class LoadGenerator { private static final int SIZE = 4096 * 1024 * 2; /** Creates a new instance of LoadGenerator */ public LoadGenerator() { } /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { // TODO code application logic here System.out.println("Start:"); System.in.read(); for (int i = 0; i < 3; i++) { testLoad(); } System.out.println(":END"); // System.in.read(); System.in.read(); } public static final void testLoad() throws Exception { int[] array = new int[SIZE]; java.util.Random rnd = new java.util.Random(); for (int i = 0; i < array.length; i++) { array[i] = rnd.nextInt(); } for (int i = 0; i < 30 * array.length; i++) { array[i % SIZE] = array[(i + 256) % SIZE]; } } }