diff --git a/src/explorviz/loadforecaster/Main.java b/src/explorviz/loadforecaster/Main.java index 5eedc6ef2618174ca91ad4a5088384f7feb76399..336e928a835e7afe44f894e6c69bb8f9ffadc38b 100644 --- a/src/explorviz/loadforecaster/Main.java +++ b/src/explorviz/loadforecaster/Main.java @@ -20,13 +20,19 @@ import org.jfree.data.xy.DefaultXYDataset; import org.jfree.data.xy.XYSeries; public class Main extends JFrame { - private static final double INTENSITY = 14; - private static final int THREAD_COUNT = 16; + private static final double INTENSITY = 6; + private static final int THREAD_COUNT = 32; + + /** + * This value somehow is bound to the thread amount => do a real run with + * the desired thread amount and low values. Afterwards, adjust the constant + * accordingly. + */ + private static final float SESSION_TO_REQUEST_RATIO = 2.6f; private static final int JMETER_INSTANCES = 1; - private static final float SESSION_TO_REQUEST_RATIO = 2.55f; - private static final long serialVersionUID = 5555101911354600988L; + private static final long serialVersionUID = 5979088644386284446L; public static void main(String[] args) { final Main demo = new Main("JPetStore Load Forecaster", "Approximate JPetStore Load"); @@ -85,8 +91,8 @@ public class Main extends JFrame { return chart; } - private static int getWorkload(float expiredMinute) { - final int numSessions = (int) ((numSessions(expiredMinute) / 2d) * INTENSITY); + private static double getWorkload(float expiredMinute) { + final double numSessions = ((int) (((numSessions(expiredMinute) / 2d) * INTENSITY) * 100d)) / 100d; return numSessions > 1 ? numSessions : 1; }