diff --git a/bench.py b/bench.py index e75fa01b5db3adfaa815295b598d064673101ac9..ce21fe3bf9e0134a62d0af457aeb260118bb7f33 100755 --- a/bench.py +++ b/bench.py @@ -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: