Skip to content

Commit 7e8bbf8

Browse files
ad-mfredericosilva
authored andcommitted
monitoring: Move result to labels in influxdb
1 parent ded03a6 commit 7e8bbf8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

monitoring/run_monitoring.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ const parseMetric = async (conn, line) => {
180180
console.log({ duration, duration_text });
181181
return sendInflux(conn, 'testcase', {
182182
title,
183+
result: 'pass',
183184
}, {
184185
duration: duration,
185186
run: startTime,
186-
result: 1,
187187
});
188188
} else if (line.includes(' ✖ ')) {
189189
const [, title, help] = line.trim().match(' *✖ (.+?)( Rejected promise returned by test)?$');
@@ -192,17 +192,17 @@ const parseMetric = async (conn, line) => {
192192
}
193193
return sendInflux(conn, 'testcase', {
194194
title,
195-
run: startTime,
195+
result: 'fail',
196196
}, {
197-
result: -1,
197+
run: startTime,
198198
});
199199
} else if (line.includes(' ◌ ')) {
200200
const [, title] = line.match(' ◌ (.+?)$');
201201
return sendInflux(conn, 'testcase', {
202202
title,
203-
run: startTime,
203+
result: 'timeout',
204204
}, {
205-
result: 0,
205+
run: startTime,
206206
});
207207
}
208208
console.log(`Failed to match line: ${line}`);

0 commit comments

Comments
 (0)