From 597eff85876362d31a6d851c184ae0c3d3e44643 Mon Sep 17 00:00:00 2001
From: Florian Fittkau <ffi@informatik.uni-kiel.de>
Date: Thu, 5 Mar 2015 23:54:19 +0100
Subject: [PATCH] wip

---
 src/explorviz/loadforecaster/Main.java | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/explorviz/loadforecaster/Main.java b/src/explorviz/loadforecaster/Main.java
index 5eedc6e..336e928 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;
 	}
 
-- 
GitLab