Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4d99ef8

Browse files
committedJan 29, 2025·
Keep order of performance results
Signed-off-by: Mariia Azbeleva <[email protected]>
1 parent 67f34cc commit 4d99ef8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎Robot-Framework/lib/PerformanceDataProcessing.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ def read_vms_data_csv_and_plot(self, test_name, vms_dict):
824824
tests = ['cpu_1thread', 'memory_read_1thread', 'memory_write_1thread', 'cpu', 'memory_read', 'memory_write']
825825
data = {test: {} for test in tests}
826826

827-
all_builds = {test: set() for test in tests}
827+
all_builds = {test: [] for test in tests}
828828

829829
for vm_name, threads in vms_dict.items():
830830
for test in tests:
@@ -854,14 +854,16 @@ def read_vms_data_csv_and_plot(self, test_name, vms_dict):
854854
'values': [build[1] for build in build_data],
855855
'threads': threads
856856
}
857-
all_builds[test].update([build[0] for build in build_data])
857+
for build in [build[0] for build in build_data]:
858+
if build not in all_builds[test]:
859+
all_builds[test].append(build)
858860

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.