diff --git a/tasksetgen.py b/tasksetgen.py index 10d928c..a21afa9 100755 --- a/tasksetgen.py +++ b/tasksetgen.py @@ -193,6 +193,7 @@ def main(): os.makedirs(args.target) print('Writing tasks…', file=sys.stderr) + taken_names={} for taskset in tasksets: task_out = [] for task in taskset: @@ -208,6 +209,12 @@ def main(): name = 'taskset_{}_{}_{}'.format(now.strftime('%Y_%m_%d'), len(taskset), utilization) + try: + taken_names[name] += 1 + except KeyError: + taken_names[name] = 1 + + name += '_{}'.format(taken_names[name]) out = {} out['name'] = name