diff --git a/fuzzer/Fuzzer.java b/fuzzer/Fuzzer.java index 792ffb3b32784fe9c5b3421c573ebba5438b7f6d..c0a338cc03ecf01c8b9e007b13fc77c4a4c38bba 100644 --- a/fuzzer/Fuzzer.java +++ b/fuzzer/Fuzzer.java @@ -28,6 +28,8 @@ public class Fuzzer { //Brownian values private static boolean USEBROWNIAN = true; + private static final double MAX_FREQ = 200; + private static final double PUT_START = 100; private static final double GET_START = 10; private static final double REM_START = 10; @@ -40,8 +42,8 @@ public class Fuzzer { private static final double SAVE_VAR = 5; private static final double LIST_VAR = 5; - //public static void Fuzzer() throws IOException { - public static void main(String[] args) throws IOException { + public static void Fuzzer() throws IOException { + //public static void main(String[] args) throws IOException { //Rob's code Double[] freqValues = null; @@ -248,6 +250,8 @@ public class Fuzzer { for (i = 0; i < INSTS.length-1; i++) { freqValues[i] = freqValues[i] + ((random.nextDouble() * 2) -1) * varValues[i]; + //Put in a ceiling to ensure doesn't do infinite PUTs + if (Math.abs(freqValues[i]) > MAX_FREQ) {freqValues[i] = MAX_FREQ;} //System.out.println("The index of: "+i + "has the frequency values of: "+freqValues[i]); } @@ -389,4 +393,4 @@ public class Fuzzer { } } -} +} \ No newline at end of file