aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-11-21 21:04:17 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-11-21 21:04:17 +0100
commitbfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937 (patch)
tree70845cce2c16adc1bfa743f0f7a20b722fb40de3
parent69ddf7df0daac4845e46397967a850277913e358 (diff)
downloadallocbench-bfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937.tar.gz
allocbench-bfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937.zip
keep not modified artifact data in cache
-rw-r--r--src/artifact.py7
-rw-r--r--src/benchmarks/dj_trace.py5
-rw-r--r--src/benchmarks/fd.py4
-rw-r--r--src/benchmarks/lld.py6
4 files changed, 13 insertions, 9 deletions
diff --git a/src/artifact.py b/src/artifact.py
index 010bc6b..fdeeead 100644
--- a/src/artifact.py
+++ b/src/artifact.py
@@ -74,7 +74,7 @@ class GitArtifact(Artifact):
# check if we have already provided this checkout
if os.path.exists(location):
- return
+ return location
# check if we have already retrieved the repo
if not os.path.exists(self.repo):
@@ -93,6 +93,7 @@ class GitArtifact(Artifact):
proc = subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=location,
# stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
+ return location
class ArchiveArtifact(Artifact):
"""External archive"""
@@ -126,7 +127,7 @@ class ArchiveArtifact(Artifact):
# Check if we already provided the archive at location
if os.path.exists(location):
- return
+ return location
os.makedirs(location, exist_ok=True)
@@ -140,3 +141,5 @@ class ArchiveArtifact(Artifact):
universal_newlines=True)
if proc.returncode != 0:
raise Exception(f"Failed to extract {self.name}")
+
+ return location
diff --git a/src/benchmarks/dj_trace.py b/src/benchmarks/dj_trace.py
index bca0d17..e376eb1 100644
--- a/src/benchmarks/dj_trace.py
+++ b/src/benchmarks/dj_trace.py
@@ -60,7 +60,7 @@ class BenchmarkDJTrace(Benchmark):
def __init__(self):
name = "dj_trace"
- self.cmd = "trace_run{binary_suffix} {build_dir}/dj_workloads/dj_workloads/{workload}.wl"
+ self.cmd = "trace_run{binary_suffix} {workload_dir}/dj_workloads/{workload}.wl"
self.measure_cmd = ""
self.args = {"workload": ["389-ds-2",
@@ -113,7 +113,8 @@ class BenchmarkDJTrace(Benchmark):
"https://www4.cs.fau.de/~flow/allocbench/dj_workloads.tar.xz",
"tar",
"c9bc499eeba8023bca28a755fffbaf9200a335ad")
- workloads.provide(os.path.join(self.build_dir, "dj_workloads"))
+
+ self.workload_dir = workloads.provide()
@staticmethod
def process_output(result, stdout, stderr, allocator, perm):
diff --git a/src/benchmarks/fd.py b/src/benchmarks/fd.py
index 29cac09..6b9c316 100644
--- a/src/benchmarks/fd.py
+++ b/src/benchmarks/fd.py
@@ -36,7 +36,7 @@ class BenchmarkFd(Benchmark):
name = "fd"
super().__init__(name)
- self.cmd = "fd -HI -e c '.*[0-9].*' {build_dir}/linux"
+ self.cmd = "fd -HI -e c '.*[0-9].*' {linux_files}"
def prepare(self):
super().prepare()
@@ -63,7 +63,7 @@ class BenchmarkFd(Benchmark):
linux = GitArtifact("linux", "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git")
linux_version = "v5.3"
- linux.provide(linux_version, os.path.join(self.build_dir, "linux"))
+ self.linux_files = linux.provide(linux_version)
def summary(self):
self.barplot_single_arg("{task-clock}",
diff --git a/src/benchmarks/lld.py b/src/benchmarks/lld.py
index d9796bc..283b512 100644
--- a/src/benchmarks/lld.py
+++ b/src/benchmarks/lld.py
@@ -214,7 +214,7 @@ class BenchmarkLld(Benchmark):
def __init__(self):
name = "lld"
- self.run_dir = "{build_dir}/lld-speed-test/{test}"
+ self.run_dir = "{test_dir}/lld-speed-test/{test}"
# TODO: don't hardcode ld.lld location
self.cmd = "/usr/bin/ld.lld @response.txt"
@@ -235,11 +235,11 @@ class BenchmarkLld(Benchmark):
"https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz",
"tar",
"2d449a11109c7363f67fd45513b42270f5ba2a92")
- tests.provide(self.build_dir)
+ self.test_dir = tests.provide()
def cleanup(self):
for perm in self.iterate_args():
- a_out = os.path.join(self.build_dir, "lld-speed-test", perm.test, "a.out")
+ a_out = os.path.join(self.test_dir, "lld-speed-test", perm.test, "a.out")
if os.path.isfile(a_out):
os.remove(a_out)