Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build type to performance report #106

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Robot-Framework/lib/PerformanceDataProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

class PerformanceDataProcessing:

def __init__(self, device, build_number):
def __init__(self, device, build_number, job):
self.device = device
self.build_number = build_number
self.data_dir = self._create_result_dir()
self.build_type = job.split(".")[0]

def _get_job_name(self):
f = open(f"../config/{self.build_number}.json")
Expand Down Expand Up @@ -159,7 +160,7 @@ def read_cpu_csv_and_plot(self, test_name):
plt.title('Latency', loc='right', fontweight="bold", fontsize=16)
plt.grid(True)

plt.suptitle(f'{test_name} ({self.device})', fontsize=18, fontweight='bold')
plt.suptitle(f'{test_name}\n(build type: {self.build_type}, device: {self.device})', fontsize=18, fontweight='bold')

plt.tight_layout()
plt.savefig(f'../test-suites/{self.device}_{test_name}.png') # Save the plot as an image file
Expand Down Expand Up @@ -242,7 +243,7 @@ def read_mem_csv_and_plot(self, test_name):
plt.legend(loc='upper right')
plt.title('Latency', loc='right', fontweight="bold", fontsize=16)

plt.suptitle(f'{test_name} ({self.device})', fontsize=18, fontweight='bold')
plt.suptitle(f'{test_name}\n(build type: {self.build_type}, device: {self.device})', fontsize=18, fontweight='bold')

plt.tight_layout()
plt.savefig(f'../test-suites/{self.device}_{test_name}.png') # Save the plot as an image file
Expand Down Expand Up @@ -300,7 +301,7 @@ def read_speed_csv_and_plot(self, test_name):

plt.xlabel('Build Number', fontsize=16)

plt.suptitle(f'{test_name} ({self.device})', fontsize=18, fontweight='bold')
plt.suptitle(f'{test_name}\n(build type: {self.build_type}, device: {self.device})', fontsize=18, fontweight='bold')

plt.tight_layout()
plt.savefig(f'../test-suites/{self.device}_{test_name}.png') # Save the plot as an image file
Expand Down Expand Up @@ -380,7 +381,7 @@ def read_fileio_data_csv_and_plot(self, test_name):
plt.title('Latency', loc='right', fontweight="bold", fontsize=16)
plt.grid(True)

plt.suptitle(f'{test_name} ({self.device})', fontsize=18, fontweight='bold')
plt.suptitle(f'{test_name}\n(build type: {self.build_type}, device: {self.device})', fontsize=18, fontweight='bold')

plt.tight_layout()
plt.savefig(f'../test-suites/{self.device}_{test_name}.png') # Save the plot as an image file
Expand Down Expand Up @@ -419,11 +420,11 @@ def read_vms_data_csv_and_plot(self, test_name, vms_dict):
if "1thread" in test:
plt.bar([x + i * 0.1 for x in range(len(vm_data['build_numbers']))], vm_data['values'], width=0.1,
label=f"{vm_name}")
plt.title(f'Comparison of {test} test results for VMs')
plt.title(f'Comparison of {test} test results for VMs\n(build type: {self.build_type}, device: {self.device})')
else:
plt.bar([x + i * 0.1 for x in range(len(vm_data['build_numbers']))], vm_data['values'], width=0.1,
label=f"{vm_name} ({vm_data['threads']} threads)")
plt.title(f'Comparison of multi-thread {test} test results for VMs')
plt.title(f'Comparison of multi-thread {test} test results for VMs\n(build type: {self.build_type}, device: {self.device})')

plt.xlabel('Builds')
plt.ylabel('Data transfer speed, MB/s' if 'memory' in test else 'Events per second')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resource ../../resources/serial_keywords.resource
Resource ../../config/variables.robot
Library ../../lib/output_parser.py
Library Process
Library ../../lib/PerformanceDataProcessing.py ${DEVICE} ${BUILD_ID}
Library ../../lib/PerformanceDataProcessing.py ${DEVICE} ${BUILD_ID} ${JOB}
Suite Setup Common Setup
Suite Teardown Close All Connections

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Resource ../../resources/ssh_keywords.resource
Resource ../../resources/device_control.resource
Resource ../../config/variables.robot
Library ../../lib/output_parser.py
Library ../../lib/PerformanceDataProcessing.py ${DEVICE} ${BUILD_ID}
Library ../../lib/PerformanceDataProcessing.py ${DEVICE} ${BUILD_ID} ${JOB}
Library Collections
Suite Setup Common Setup
Suite Teardown Close All Connections
Expand Down
Loading