diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2018-09-08 15:51:20 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2018-09-08 15:51:20 +0200 |
| commit | 5e78c1ccda63bcbfd065f5dbde70f7e3ee1b881c (patch) | |
| tree | f66d22c8c2f8862cf37b5dbc3e443559e54d1fc4 /benchmark.py | |
| parent | 68ddcf81f2768509b4bdc14df70d518dbd9e6811 (diff) | |
| download | allocbench-5e78c1ccda63bcbfd065f5dbde70f7e3ee1b881c.tar.gz allocbench-5e78c1ccda63bcbfd065f5dbde70f7e3ee1b881c.zip | |
measure wall time in falsesharing and fix summary for results with different args
Diffstat (limited to 'benchmark.py')
| -rw-r--r-- | benchmark.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/benchmark.py b/benchmark.py index 920772f..caa25fd 100644 --- a/benchmark.py +++ b/benchmark.py @@ -93,15 +93,17 @@ class Benchmark (object): return True - def iterate_args(self): + def iterate_args(self, args=None): """Return a dict for each possible combination of args""" - arg_names = sorted(self.args.keys()) - for p in itertools.product(*[self.args[k] for k in arg_names]): + if not args: + args = self.args + arg_names = sorted(args.keys()) + for p in itertools.product(*[args[k] for k in arg_names]): Perm = namedtuple("Perm", arg_names) yield Perm(*p) - def iterate_args_fixed(self, fixed): - for p in self.iterate_args(): + def iterate_args_fixed(self, fixed, args=None): + for p in self.iterate_args(args=args): p_dict = p._asdict() is_fixed = True for k in fixed: |
