Skip to content

Commit

Permalink
logs on
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Jun 14, 2024
1 parent ab495bf commit 69e60bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ function getChangedCustomMetrics() {
* @throws {Error} If the test run fails or the response status code is not 200.
*/
function runWPTTest(url) {
const custom_metrics = getCustomMetrics();
const metrics_to_log = getChangedCustomMetrics();
const custom_metrics = getCustomMetrics()
console.log('CUSTOM METRICS:', custom_metrics.join(' '))
const metrics_to_log = getChangedCustomMetrics()
console.log('METRICS TO LOG:', metrics_to_log.join(' '))

let options = { key: wptApiKey, custom: '' };
for (const metric_name of custom_metrics) {
Expand All @@ -75,6 +77,7 @@ function runWPTTest(url) {
let wpt_custom_metrics = {}
let wpt_custom_metrics_to_log = {}
for (const metric_name of custom_metrics) {
console.log(`Retrieving custom metric ${metric_name}`)
wpt_custom_metric = response.data.runs['1'].firstView[`_${metric_name}`];
try {
wpt_custom_metrics[`_${metric_name}`] = JSON.parse(wpt_custom_metric);
Expand Down

0 comments on commit 69e60bb

Please sign in to comment.