Skip to content

Commit 8dc48b2

Browse files
committed
Support liberty_throughput_dt10 in Traffic Light
resolves: automation/issues/540 Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
1 parent f135f69 commit 8dc48b2

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

TestResultSummaryService/parsers/BenchmarkMetric.js

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,34 @@ const BenchmarkMetricRegex = {
109109
},
110110
},
111111
liberty_throughput_dt10: {
112-
//Example: Running 1 measures...
113-
outerRegex: /Running \d* measures([\s\S\n]*)/,
112+
outerRegex: /<run runNo="5" runType="measure"([\s\S\n]*)/,
114113
metrics: {
115-
Footprint: {
116-
//Example: Footprint (kb)=168940
114+
Throughput: {
115+
//Example: <metric type="throughput">\n<data machine="lance10G" units="req/sec">63.4</data>
116+
regex: /<metric type="throughput">[\s\S\n]*?(\d*\.?\d*)<\/data>/,
117+
higherbetter: true,
118+
units: 'ops/s',
119+
},
120+
'CPU Util pct': {
121+
//Example: <data machine="wehrlein10G" units="%" cv="1.0064976672229644">15.139217146458863</data>
122+
regex: /<metric type="CPU Utilization">[\s\S\n]*?<\/data>[\s\S\n]*?<data[\s\S\n]*?>(\d*\.?\d*)*/,
123+
higherbetter: false,
124+
units: '%',
125+
},
126+
'JIT CPU total ms': {
127+
//Example: #PERF: Time spent in compilation thread =22323 ms
128+
//JITCPUtotal is sum of all JIT CPU usage use values in verbose logs
129+
regex: /#PERF[\s\S\n]*?compilation thread =(\d*\.?\d*)[\s\S\n]*?/,
130+
higherbetter: false,
131+
units: '%',
132+
funcName: math.sum,
133+
},
134+
'Adjusted Single Server Memory (Footprint)': {
135+
//Example: Footprint (kb)=589444
117136
regex: /Footprint \(kb\)=(\d*\.?\d*)/,
118137
higherbetter: false,
119138
units: 'kb',
120139
},
121-
Throughput: {
122-
//Example: Page throughput = 2923.0 /s
123-
regex: /Page throughput = (\d*\.?\d*)/,
124-
higherbetter: true,
125-
units: 'req/sec',
126-
},
127140
},
128141
},
129142
bumbleBench: {

TestResultSummaryService/parsers/Utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Utils {
5050
for (let i = 0; i < curMetricList.length; i++) {
5151
curMetric = curMetricList[i];
5252
curRegex = curBenchVariant['metrics'][curMetric]['regex'];
53+
console.log('curRegex: ', curRegex);
5354
/* Parse all values for single metric from result to an array
5455
* e.g
5556
* Liberty Startup =>
@@ -58,11 +59,13 @@ class Utils {
5859
* curRegexResult = ['<metric type="throughput">32<\/data>',32]
5960
*/
6061
curRegexResult = testOutput.split(curRegex);
62+
console.log('curRegexResult: ', curRegexResult);
6163
//collect only the capture groups from the regex array
6264
curRegexResult = curRegexResult.filter(
6365
(value, index) => index % 2 === 1
6466
);
6567
curMetricValues = curRegexResult.map(parseFloat);
68+
console.log('curMetricValues: ', curMetricValues);
6669
/* Metrics such as JITCPU total in LibertyThroughput and geomean_GCA in CryptoBB,
6770
* require aggregate function to be applied.
6871
* e.g JIT CPU total values are collected as [ 0,0,300,200,20 ] but we display 520 as the JITCPU total
@@ -78,6 +81,8 @@ class Utils {
7881
),
7982
];
8083
}
84+
console.log('curMetric: ', curMetric);
85+
console.log('curMetricValues: ', curMetricValues);
8186
curTestData['metrics'].push({
8287
name: curMetric,
8388
value: curMetricValues,

0 commit comments

Comments
 (0)