Skip to content
Snippets Groups Projects
Commit dad3d72a authored by Florian Fittkau's avatar Florian Fittkau
Browse files

...

parent d46f6849
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,8 @@ public class Main extends JFrame {
setContentPane(chartPanel);
if (CREATE_PLAN_ON_STDOUT) {
createVariableThroughputOut();
// createVariableThroughputOut();
createUltimateThreadGroupOut();
}
addWindowListener(new WindowAdapter() {
......@@ -64,19 +65,38 @@ public class Main extends JFrame {
int propCounter = 1;
for (int currentSecond = 0; currentSecond < PLAN_OVERALL_DURATION_IN_SEC; currentSecond += PLAN_DURATION_STEP_IN_SEC) {
output("propName" + propCounter++, getWorkload(currentSecond / 60f),
outputThrough("propName" + propCounter++, getWorkload(currentSecond / 60f),
getWorkload((currentSecond + PLAN_DURATION_STEP_IN_SEC) / 60f),
PLAN_DURATION_STEP_IN_SEC);
}
}
private void output(String propName, int startRPS, int targetRPS, int durationInSec) {
private void outputThrough(String propName, int startRPS, int targetRPS, int durationInSec) {
System.out.println("<collectionProp name=\"" + propName + "\">\n\t<stringProp name=\""
+ startRPS + "\">" + startRPS + "</stringProp>\n\t<stringProp name=\"" + targetRPS
+ "\">" + targetRPS + "</stringProp>\n\t<stringProp name=\"" + durationInSec
+ "\">" + durationInSec + "</stringProp>\n</collectionProp>");
}
private void createUltimateThreadGroupOut() {
int propCounter = 1;
for (int currentSecond = 0; currentSecond < PLAN_OVERALL_DURATION_IN_SEC; currentSecond += PLAN_DURATION_STEP_IN_SEC) {
outputUlti("propName" + propCounter++,
getWorkload((currentSecond + PLAN_DURATION_STEP_IN_SEC) / 60f) / 2,
currentSecond, PLAN_DURATION_STEP_IN_SEC);
}
}
private void outputUlti(String propName, int threads, int startSec, int durationInSec) {
System.out.println("<collectionProp name=\"" + propName + "\">\n\t<stringProp name=\""
+ threads + "\">" + threads + "</stringProp>\n\t<stringProp name=\"" + startSec
+ "\">" + startSec + "</stringProp>\n\t<stringProp name=\"" + 0 + "\">" + 0
+ "</stringProp>\n\t<stringProp name=\"" + durationInSec + "\">" + durationInSec
+ "</stringProp>\n\t<stringProp name=\"" + 0 + "\">" + 0
+ "</stringProp>\n</collectionProp>");
}
private DefaultXYDataset createDataset() {
final DefaultXYDataset dataset = new DefaultXYDataset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment