You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2. The function also checks if the data contains ".io" at the end.
30126
+
*
30127
+
* */
30128
+
if (!data.includes(".io")) {
30129
+
return false;
30130
+
}
30131
+
let K6_ASCII_ART_CHARS = [
30132
+
'|', ' ', '\n', '/',
30133
+
'‾', '(', ')', '_',
30134
+
'.', 'i', 'o', '\\'
30135
+
], dataChars = new Set(data);
30136
+
if (dataChars.size !== K6_ASCII_ART_CHARS.length) {
30137
+
return false;
30138
+
}
30139
+
else {
30140
+
for (let char of dataChars) {
30141
+
if (!K6_ASCII_ART_CHARS.includes(char)) {
30142
+
return false;
30143
+
}
30144
+
}
30145
+
return true;
30146
+
}
30147
+
}
30148
+
function parseK6Output(data, testResultUrlsMap, totalTestRuns) {
30149
+
/*
30150
+
* This function is responsible for parsing the output of the k6 command.
30151
+
* It filters out the progress lines and logs the rest of the output.
30152
+
* It also extracts the test run URLs from the output.
30153
+
*
30154
+
* @param {Buffer} data - The k6 command output data
30155
+
* @param {TestResultUrlsMap | null} testResultUrlsMap - The map containing the script path and output URL. If null, the function will not extract test run URLs.
30156
+
* @param {number} totalTestRuns - The total number of test runs. This is used to determine when all test run URLs have been extracted.
* This function is responsible for parsing the output of the k6 command.
94
+
* It filters out the progress lines and logs the rest of the output.
95
+
* It also extracts the test run URLs from the output.
96
+
*
97
+
* @param {Buffer} data - The k6 command output data
98
+
* @param {TestResultUrlsMap | null} testResultUrlsMap - The map containing the script path and output URL. If null, the function will not extract test run URLs.
99
+
* @param {number} totalTestRuns - The total number of test runs. This is used to determine when all test run URLs have been extracted.
0 commit comments