Commit 23bab00b authored by Christian Dietrich's avatar Christian Dietrich
Browse files

experiments: add semi-colon to newline testcase

ccache does not redo the compilation, if only a newline was added. But
a single semi-colon does do the trick.
parent 1b8291b8
Pipeline #2992 passed with stage
in 0 seconds
...@@ -75,7 +75,7 @@ class IncrementalCompilation(Experiment): ...@@ -75,7 +75,7 @@ class IncrementalCompilation(Experiment):
os.utime(path, None) os.utime(path, None)
else: else:
with open(path, "a") as fd: with open(path, "a") as fd:
fd.write("\n") fd.write(";\n")
def rebuild(self, path, cause): def rebuild(self, path, cause):
info = {'filename': cause} info = {'filename': cause}
......
...@@ -20,7 +20,6 @@ import matplotlib.pyplot as plt ...@@ -20,7 +20,6 @@ import matplotlib.pyplot as plt
import matplotlib.patches as mpatches import matplotlib.patches as mpatches
from incremental_rebuild import IncrementalCompilation from incremental_rebuild import IncrementalCompilation
from lib import read_hash_directory
class IncrementalCompilationPlots(Experiment): class IncrementalCompilationPlots(Experiment):
inputs = {'results': List(IncrementalCompilation(), [])} inputs = {'results': List(IncrementalCompilation(), [])}
...@@ -34,21 +33,13 @@ class IncrementalCompilationPlots(Experiment): ...@@ -34,21 +33,13 @@ class IncrementalCompilationPlots(Experiment):
return "%s-%s" %(self.title, self.project_name) return "%s-%s" %(self.title, self.project_name)
def run(self): def run(self):
names = set([x.project_name() for x in self.results]) self.project_name = ""
assert len(names) == 1, "Different projects are mixed" for result in sorted(self.results, key=lambda x: (x.variant_name())):
self.project_name = list(names)[0]
for result in self.results:
print(result.stats.path)
records = eval(result.stats.value) records = eval(result.stats.value)
print result.name, len(records['builds'])
build_times_all = [] build_times_all = []
build_times_headers = [] build_times_headers = []
build_times_sources = [] build_times_sources = []
#hash_info = read_hash_directory(result.hashes.path)
#print(hash_info)
for build in records['builds']: for build in records['builds']:
t = build['build-time'] / 1e9 t = build['build-time'] / 1e9
...@@ -61,11 +52,13 @@ class IncrementalCompilationPlots(Experiment): ...@@ -61,11 +52,13 @@ class IncrementalCompilationPlots(Experiment):
build_times_headers.append(t) build_times_headers.append(t)
else: else:
build_times_sources.append(t) build_times_sources.append(t)
if "alltypes" in build['filename']:
print(result.variant_name(), t) #if "alltypes" in build['filename']:
# print(build['filename'], t, build['compiler-calls'])
#print(build['id']) #print(build['id'])
self.save([result.variant_name(), 'rebuild', 'avg'], self.save([result.variant_name(), 'rebuild', 'avg'],
np.average(build_times_all)) np.average(build_times_all))
if build_times_sources: if build_times_sources:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment