Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
evaluation-orchestrator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mowgli
evaluation-orchestrator
Commits
94a99a08
Commit
94a99a08
authored
Jun 24, 2019
by
Julia Abramenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepared saving opportunity for different file formats
parent
ae500e54
Pipeline
#50756
passed with stage
in 22 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
plotting/timeseries/aggregateTimeseries.py
plotting/timeseries/aggregateTimeseries.py
+11
-5
No files found.
plotting/timeseries/aggregateTimeseries.py
View file @
94a99a08
...
...
@@ -25,6 +25,7 @@ class TimeSeriesAggregator:
self
.
agg_throughput
=
None
self
.
cols_latency
=
None
self
.
cols_throughput
=
None
self
.
format
=
'pdf'
self
.
run
=
-
1
self
.
files
=
0
self
.
min_t
=
0
...
...
@@ -59,6 +60,7 @@ class TimeSeriesAggregator:
parser
.
add_argument
(
'--plotAverage'
,
'-pa'
,
action
=
'store_true'
,
default
=
False
,
required
=
False
)
# optional plotting of outliers as scatter points, processed if '-outscat' is given
parser
.
add_argument
(
'--outlier_scatter'
,
'-outscat'
,
action
=
'store_true'
,
default
=
False
,
required
=
False
)
parser
.
add_argument
(
'--format'
,
'-f'
,
type
=
str
,
nargs
=
1
,
required
=
False
)
# fix the parser as main parser object of the TimeSeriesAggregator object
self
.
parser
=
parser
...
...
@@ -92,6 +94,8 @@ class TimeSeriesAggregator:
self
.
plotAverage
=
args
.
plotAverage
# if scatter plot shall be added
self
.
outlier_scatter
=
args
.
outlier_scatter
if
args
.
format
is
not
None
:
self
.
format
=
args
.
format
[
0
]
def
extract_input
(
self
):
"""
...
...
@@ -178,7 +182,8 @@ class TimeSeriesAggregator:
# calculate the overall mean
overall_mean
=
self
.
agg_throughput
[
"Mean"
].
mean
()
# draw the overall mean as horizontal line
ax
.
axhline
(
overall_mean
,
linestyle
=
'--'
,
label
=
'Overall Average'
,
color
=
'black'
)
if
self
.
plotAverage
:
ax
.
axhline
(
overall_mean
,
linestyle
=
'--'
,
label
=
'Overall Average'
,
color
=
'black'
)
# draw the marker with its label on the graph if given
if
self
.
marker_pos_x
is
not
None
:
ax
.
axvline
(
self
.
marker_pos_x
,
color
=
'red'
,
linestyle
=
':'
,
label
=
self
.
label_text
)
...
...
@@ -196,7 +201,7 @@ class TimeSeriesAggregator:
# indicating saving process
print
(
"Saving throughput plot to disk: "
+
output_file
)
# store the created picture
plt
.
savefig
(
output_file
,
format
=
'pdf'
)
plt
.
savefig
(
output_file
,
format
=
self
.
format
)
plt
.
close
()
def
plot_latency
(
self
):
...
...
@@ -228,7 +233,8 @@ class TimeSeriesAggregator:
# calculate the overall mean
overall_mean
=
self
.
agg_latency
[
"Mean"
].
mean
()
# draw the overall mean as horizontal line
ax
.
axhline
(
overall_mean
,
linestyle
=
'--'
,
label
=
'Overall Average'
,
color
=
'black'
)
if
self
.
plotAverage
:
ax
.
axhline
(
overall_mean
,
linestyle
=
'--'
,
label
=
'Overall Average'
,
color
=
'black'
)
# draw the marker with its label on the graph if given
if
self
.
marker_pos_x
is
not
None
:
ax
.
axvline
(
self
.
marker_pos_x
,
color
=
'red'
,
linestyle
=
':'
,
label
=
str
(
self
.
label_text
))
...
...
@@ -253,14 +259,14 @@ class TimeSeriesAggregator:
x
,
y
=
zip
(
*
item
)
plt
.
scatter
(
x
,
y
,
color
=
color_dict
[
key
],
label
=
"outlier {}"
.
format
(
key
))
# modify default legend
ax
.
legend
(
loc
=
'lower center'
,
ncol
=
3
,
borderpad
=
1
,
prop
=
{
'size'
:
6
})
ax
.
legend
(
loc
=
'lower center'
,
ncol
=
4
,
borderpad
=
1
,
prop
=
{
'size'
:
6
})
# adjust size of the figure
plt
.
plot
(
figsize
=
(
1000
,
600
))
# indicating saving process
print
(
"Saving latency plot to disk: "
+
output_file
)
# store the created picture
plt
.
savefig
(
output_file
,
format
=
'pdf'
)
plt
.
savefig
(
output_file
,
format
=
self
.
format
)
# @staticmethod
def
remove_outliers
(
self
,
df_in
,
col_name
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment