diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-24 17:20:37 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-24 17:20:37 +0200 |
| commit | 6dc6cea0b738c74852b920a9cf2fb1c49634dbe9 (patch) | |
| tree | d62ec1409b359e5a8088f7d2aae716a37b90fcfc | |
| parent | 2d86e20f5a44aea66725686531463931f38aa2dc (diff) | |
| download | allocbench-6dc6cea0b738c74852b920a9cf2fb1c49634dbe9.tar.gz allocbench-6dc6cea0b738c74852b920a9cf2fb1c49634dbe9.zip | |
give each allocator a unique color
| -rwxr-xr-x | bench.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -117,8 +117,19 @@ def main(): importlib.import_module('src.allocators.installed_allocators') allocators = src.allocators.installed_allocators.allocators + # set colors + explicit_colors = [v["color"] for k, v in allocators.items() if v["color"] is not None] + print_debug("Explicit colors:", explicit_colors) + avail_colors = [color for color in ["C" + str(i) for i in range(0,16)] if color not in explicit_colors] + print_debug("available colors:", avail_colors) + + for k, v in allocators.items(): + if v["color"] is None: + v["color"] = avail_colors.pop() + src.globalvars.allocators = allocators print_info("Allocators:", *src.globalvars.allocators.keys()) + print_debug("Allocators:", *src.globalvars.allocators.items()) # Load facts if args.load: |
