Skip to content
Snippets Groups Projects
Commit 6dc6cea0 authored by Florian Fischer's avatar Florian Fischer
Browse files

give each allocator a unique color

parent 2d86e20f
No related branches found
No related tags found
No related merge requests found
...@@ -117,8 +117,19 @@ def main(): ...@@ -117,8 +117,19 @@ def main():
importlib.import_module('src.allocators.installed_allocators') importlib.import_module('src.allocators.installed_allocators')
allocators = src.allocators.installed_allocators.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 src.globalvars.allocators = allocators
print_info("Allocators:", *src.globalvars.allocators.keys()) print_info("Allocators:", *src.globalvars.allocators.keys())
print_debug("Allocators:", *src.globalvars.allocators.items())
# Load facts # Load facts
if args.load: if args.load:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment