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
1d3f9427
Commit
1d3f9427
authored
Feb 04, 2017
by
Christian Dietrich
Browse files
log the ccache output
parent
31154fce
Pipeline
#3105
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
experiments/lib.py
View file @
1d3f9427
...
...
@@ -107,11 +107,11 @@ class ClangHashHelper:
ccache_hits
+=
int
(
line
[
line
.
index
(
")"
)
+
1
:].
strip
())
if
"cache miss"
in
line
:
ccache_misses
+=
int
(
line
[
line
.
index
(
"miss"
)
+
4
:].
strip
())
return
ccache_hits
,
ccache_misses
return
ccache_hits
,
ccache_misses
,
"
\n
"
.
join
(
lines
)
def
rebuild
(
self
,
path
,
info
,
fail_ok
=
False
):
if
"ccache"
in
self
.
mode
.
value
:
old_ccache_hits
,
old_ccache_misses
=
self
.
ccache_hi
ts
(
)
shell
(
"ccache --zero-sta
ts
"
)
if
"clang-hash"
in
self
.
mode
.
value
:
hash_log
=
tempfile
.
NamedTemporaryFile
()
...
...
@@ -135,9 +135,10 @@ class ClangHashHelper:
# Record Cache misses and hits
if
"ccache"
in
self
.
mode
.
value
:
ccache_hits
,
ccache_misses
=
self
.
ccache_hits
()
info
[
'ccache-hits'
]
=
ccache_hits
-
old_ccache_hits
info
[
'ccache-misses'
]
=
ccache_misses
-
old_ccache_misses
ccache_hits
,
ccache_misses
,
log
=
self
.
ccache_hits
()
info
[
'ccache-log'
]
=
log
info
[
'ccache-hits'
]
=
ccache_hits
info
[
'ccache-misses'
]
=
ccache_misses
if
"clang-hash"
in
self
.
mode
.
value
:
log
=
hash_log
.
read
()
...
...
@@ -146,6 +147,7 @@ class ClangHashHelper:
info
[
'clang-hash-misses'
]
=
log
.
count
(
"M"
)
hash_log
.
close
()
logging
.
info
(
"Rebuild done[%s]: %s s; failed=%s"
,
info
.
get
(
"filename"
)
or
info
.
get
(
"commit"
),
build_time
/
1e9
,
...
...
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