Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Tobias Langer
/
experiment
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a48033b3
authored
Nov 21, 2016
by
Tobias Langer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print the average misses number.
parent
f05456ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
analysis.py
+9
-0
No files found.
analysis.py
View file @
a48033b3
...
@@ -63,8 +63,11 @@ def main():
...
@@ -63,8 +63,11 @@ def main():
s2s
=
0
s2s
=
0
e2e
=
0
e2e
=
0
misses
=
0
misses
=
0
misses_avrg
=
0
exec_cnt
=
0
response
=
0
response
=
0
for
task_id
,
task
in
instances
.
items
():
for
task_id
,
task
in
instances
.
items
():
exec_cnt
+=
tasks
[
task_id
][
'executions'
]
s2s
+=
math
.
sqrt
(
task
[
's2s'
]
/
tasks
[
task_id
][
'executions'
])
s2s
+=
math
.
sqrt
(
task
[
's2s'
]
/
tasks
[
task_id
][
'executions'
])
e2e
+=
math
.
sqrt
(
task
[
'e2e'
]
/
tasks
[
task_id
][
'executions'
])
e2e
+=
math
.
sqrt
(
task
[
'e2e'
]
/
tasks
[
task_id
][
'executions'
])
misses
+=
task
[
'misses'
]
misses
+=
task
[
'misses'
]
...
@@ -73,6 +76,7 @@ def main():
...
@@ -73,6 +76,7 @@ def main():
s2s
/=
len
(
tasks
)
s2s
/=
len
(
tasks
)
e2e
/=
len
(
tasks
)
e2e
/=
len
(
tasks
)
response
/=
len
(
tasks
)
response
/=
len
(
tasks
)
misses_avrg
/=
exec_cnt
outkey
=
round
(
util
,
2
)
outkey
=
round
(
util
,
2
)
...
@@ -96,6 +100,11 @@ def main():
...
@@ -96,6 +100,11 @@ def main():
for
elem
in
value
:
for
elem
in
value
:
print
(
'{}; {}'
.
format
(
key
,
elem
[
2
]),
file
=
missesfile
)
print
(
'{}; {}'
.
format
(
key
,
elem
[
2
]),
file
=
missesfile
)
with
open
(
'analysis/misses_avrg.dat'
,
'w'
)
as
missesavrgfile
:
for
key
,
value
in
out
.
items
():
for
elem
in
value
:
print
(
'{}; {}'
.
format
(
key
,
elem
[
3
]),
file
=
missesavrgfile
)
with
open
(
'analysis/response.dat'
,
'w'
)
as
responsefile
:
with
open
(
'analysis/response.dat'
,
'w'
)
as
responsefile
:
for
key
,
value
in
out
.
items
():
for
key
,
value
in
out
.
items
():
for
elem
in
value
:
for
elem
in
value
:
...
...
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