Skip to content

Commit

Permalink
Keep order of performance results
Browse files Browse the repository at this point in the history
Signed-off-by: Mariia Azbeleva <[email protected]>
  • Loading branch information
azbeleva committed Jan 29, 2025
1 parent 67f34cc commit 4d99ef8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Robot-Framework/lib/PerformanceDataProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def read_vms_data_csv_and_plot(self, test_name, vms_dict):
tests = ['cpu_1thread', 'memory_read_1thread', 'memory_write_1thread', 'cpu', 'memory_read', 'memory_write']
data = {test: {} for test in tests}

all_builds = {test: set() for test in tests}
all_builds = {test: [] for test in tests}

for vm_name, threads in vms_dict.items():
for test in tests:
Expand Down Expand Up @@ -854,14 +854,16 @@ def read_vms_data_csv_and_plot(self, test_name, vms_dict):
'values': [build[1] for build in build_data],
'threads': threads
}
all_builds[test].update([build[0] for build in build_data])
for build in [build[0] for build in build_data]:
if build not in all_builds[test]:
all_builds[test].append(build)

for test in tests:
plt.figure(figsize=(10, 6))

for i, (vm_name, vm_data) in enumerate(data[test].items()):
if vm_data:
indices = [list(all_builds[test]).index(build) for build in vm_data['commit']]
indices = [all_builds[test].index(build) for build in vm_data['commit']]
plt.bar([x + i * 0.1 for x in indices], vm_data['values'], width=0.1,
label=f"{vm_name} ({vm_data['threads']} threads)" if "1thread" not in test else vm_name)

Expand Down

0 comments on commit 4d99ef8

Please sign in to comment.