Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
workload-visualizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExplorViz
explorviz-github-archive
workload-visualizer
Commits
dad3d72a
Commit
dad3d72a
authored
10 years ago
by
Florian Fittkau
Browse files
Options
Downloads
Patches
Plain Diff
...
parent
d46f6849
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/explorviz/loadforecaster/Main.java
+23
-3
23 additions, 3 deletions
src/explorviz/loadforecaster/Main.java
with
23 additions
and
3 deletions
src/explorviz/loadforecaster/Main.java
+
23
−
3
View file @
dad3d72a
...
...
@@ -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
/
60
f
),
output
Through
(
"propName"
+
propCounter
++,
getWorkload
(
currentSecond
/
60
f
),
getWorkload
((
currentSecond
+
PLAN_DURATION_STEP_IN_SEC
)
/
60
f
),
PLAN_DURATION_STEP_IN_SEC
);
}
}
private
void
output
(
String
propName
,
int
startRPS
,
int
targetRPS
,
int
durationInSec
)
{
private
void
output
Through
(
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
)
/
60
f
)
/
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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment