Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Dietrich
clang-hash
Commits
08c6c287
Commit
08c6c287
authored
Feb 01, 2017
by
Christian Dietrich
Browse files
analysis: investigate on hit anomaly
parent
a198dae5
Pipeline
#3078
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
experiments/analyze_results.py
View file @
08c6c287
...
...
@@ -89,6 +89,7 @@ class AnalyzeResults(Experiment):
x
=
sorted
(
self
.
historical
,
key
=
lambda
x
:
x
.
project_name
())
hist
=
defaultdict
(
lambda
:
0
)
method_stats
=
defaultdict
(
lambda
:
defaultdict
(
lambda
:
0
))
HITS
=
defaultdict
(
lambda
:
defaultdict
(
lambda
:
0
))
for
(
project
,
results
)
in
groupby
(
x
,
key
=
lambda
x
:
x
.
project_name
()):
times
=
defaultdict
(
lambda
:
dict
())
...
...
@@ -119,8 +120,14 @@ class AnalyzeResults(Experiment):
+
build
.
get
(
'clang-hash-hits'
,
0
)
stats
[
'misses'
]
+=
build
.
get
(
'ccache-misses'
,
0
)
\
+
build
.
get
(
'clang-hash-misses'
,
0
)
if
result
.
mode
.
value
==
"ccache-clang-hash"
:
stats
[
"misses"
]
-=
build
.
get
(
'clang-hash-hits'
,
0
)
if
result
.
metadata
[
'mode'
]
==
"ccache-clang-hash"
:
stats
[
"misses"
]
-=
(
build
.
get
(
'clang-hash-hits'
,
0
)
\
+
build
.
get
(
'clang-hash-misses'
,
0
))
a
=
build
.
get
(
'ccache-hits'
,
0
)
b
=
build
.
get
(
'clang-hash-hits'
,
0
)
HITS
[
build
[
'commit'
]][
result
.
metadata
[
'mode'
]]
\
=
(
a
+
b
,
a
,
b
)
# Over all builds of an experiment
def
seq
(
key
,
seq
):
...
...
@@ -153,6 +160,10 @@ class AnalyzeResults(Experiment):
for
k
in
method_stats
[
method
]:
self
.
save
([
method
,
"historical"
,
k
],
method_stats
[
method
][
k
])
for
Hash
in
HITS
:
if
HITS
[
Hash
][
'clang-hash'
][
0
]
!=
HITS
[
Hash
][
'ccache-clang-hash'
][
0
]:
print
Hash
,
HITS
[
Hash
][
'clang-hash'
][
0
]
-
HITS
[
Hash
][
'ccache-clang-hash'
][
0
],
HITS
[
Hash
]
if
__name__
==
"__main__"
:
experiment
=
AnalyzeResults
()
dirname
=
experiment
(
sys
.
argv
+
[
"-s"
])
Write
Preview
Supports
Markdown
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