Merge ~ian-may/+git/autotest-client-tests:dgx-pts-updates into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Ian May
Status: Merged
Merged at revision: 95e0fb5ca1fb896b6b47a90e04f274606317d76e
Proposed branch: ~ian-may/+git/autotest-client-tests:dgx-pts-updates
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 108 lines (+38/-22)
1 file modified
ubuntu_performance_pts/ubuntu_performance_pts.py (+38/-22)
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Review via email: mp+452128@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

Looks good.

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

Applied and pushed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_performance_pts/ubuntu_performance_pts.py b/ubuntu_performance_pts/ubuntu_performance_pts.py
2index 5130438..5f23b5d 100644
3--- a/ubuntu_performance_pts/ubuntu_performance_pts.py
4+++ b/ubuntu_performance_pts/ubuntu_performance_pts.py
5@@ -109,7 +109,8 @@ class ubuntu_performance_pts(test.test):
6 'libpng-dev',
7 'autoconf',
8 'linux-tools-generic',
9- 'linux-tools-' + release
10+ 'linux-tools-' + release,
11+ 'numactl'
12 ]
13 if series in ['bionic']:
14 pkgs.append('libssl1.0-dev')
15@@ -172,10 +173,13 @@ class ubuntu_performance_pts(test.test):
16 # add pretty colors. Skip over all these and
17 # grab the last number in the field
18 #
19+ if field not in values:
20+ values[field] = []
21+
22 if n > 0:
23- values[field] = numbers[n - 1]
24+ values[field].append(numbers[n - 1])
25 else:
26- values[field] = 0
27+ values[field].append(0)
28
29 return values
30
31@@ -198,7 +202,8 @@ class ubuntu_performance_pts(test.test):
32 print("Test %d of %d:" % (i + 1, test_iterations))
33 for field in fields:
34 if field in values[i]:
35- print(benchmark + "_" + field.lower() + "[%d] %s" % (i, values[i][field]))
36+ for j, value in enumerate(values[i][field]):
37+ print(benchmark + "_" + field.lower() + "[%d][%d] %s" % (i, j, value))
38
39 #
40 # Compute min/max/average:
41@@ -206,30 +211,37 @@ class ubuntu_performance_pts(test.test):
42 field = 'Average'
43 if values[i] != {}:
44 test_run = True
45- v = [ float(values[i][field]) for i in values ]
46- test_run = True
47- maximum = max(v)
48- minimum = min(v)
49- average = sum(v) / float(len(v))
50- max_err = (maximum - minimum) / average * 100.0
51+ for test_num in range(len(values[i][field])):
52+ v = [ float(values[i][field][test_num]) for i in values ]
53+ maximum = max(v)
54+ minimum = min(v)
55+ average = sum(v) / float(len(v))
56+ max_err = (maximum - minimum) / average * 100.0
57
58- print("")
59- print(benchmark + "_" + field.lower() + "_minimum %.2f" % (minimum))
60- print(benchmark + "_" + field.lower() + "_maximum %.2f" % (maximum))
61- print(benchmark + "_" + field.lower() + "_average %.2f" % (average))
62- print(benchmark + "_" + field.lower() + "_maximum_error %.2f%%" % (max_err))
63- print("")
64+ print("")
65+ print(benchmark + "_" + field.lower() + "_minimum %.2f" % (minimum))
66+ print(benchmark + "_" + field.lower() + "_maximum %.2f" % (maximum))
67+ print(benchmark + "_" + field.lower() + "_average %.2f" % (average))
68+ print(benchmark + "_" + field.lower() + "_maximum_error %.2f%%" % (max_err))
69+ print("")
70
71- if max_err > 5.0:
72- print("FAIL: maximum error is greater than 5%")
73- test_pass = False
74+ if max_err > 5.0:
75+ print("FAIL: maximum error is greater than 5%")
76+ test_pass = False
77
78- if test_pass:
79- print("PASS: test passes specified performance thresholds")
80+ if test_pass:
81+ print("PASS: test passes specified performance thresholds")
82
83 if not test_run:
84 print("NOTRUN: test not run, no data")
85
86+ def get_platform(self):
87+ bpn = utils.system_output('dmidecode -s baseboard-product-name | head -1', retain_output=True)
88+ if bpn == 'DGXA100':
89+ return 'DGXA100'
90+ else:
91+ return 'Default'
92+
93 def run_john_the_ripper_blowfish(self, test_name, tag):
94 if self.get_platform_distro()[1].split('.')[0] > "20":
95 cmd = 'export PRESET_OPTIONS="john-the-ripper.run-test=Blowfish"; %s phoronix-test-suite batch-benchmark john-the-ripper-1.8.0' % force_times_to_run
96@@ -250,7 +262,11 @@ class ubuntu_performance_pts(test.test):
97 self.print_stats(test_name, cmd)
98
99 def run_ttsiod_renderer(self, test_name, tag):
100- cmd = '%s phoronix-test-suite batch-benchmark ttsiod-renderer-1.7.0' % force_times_to_run
101+ #if on DGXA100 bind cpu and mem to stable numa range
102+ if self.get_platform() == 'DGXA100':
103+ cmd = 'numactl -N 0-3 -m 0-3 %s phoronix-test-suite batch-benchmark ttsiod-renderer-1.7.0' % force_times_to_run
104+ else:
105+ cmd = '%s phoronix-test-suite batch-benchmark ttsiod-renderer-1.7.0' % force_times_to_run
106 self.print_stats(test_name, cmd)
107
108 def run_generic(self, test_name, subtest):

Subscribers

People subscribed via source and target branches

to all changes: