Skip to content

Commit

Permalink
fix: track collected/discarded traces when recordSuccessfulVUs is set
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed May 10, 2024
1 parent 05c5a1c commit 533b301
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/artillery-engine-playwright/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,10 @@ class PlaywrightEngine {
await context.tracing.stop({
path: initialContext.vars.__tracePath
});
events.emit('counter', 'browser.traces_recorded', 1);
events.emit('counter', 'browser.traces_collected', 1);
self.lastTraceRecordedTime = Date.now();
self.tracesRecordedCount++;
initialContext.vars.isRecording = false; // for finally{} block
} else {
events.emit('counter', 'browser.traces_discarded', 1);
}
}

Expand All @@ -426,8 +424,10 @@ class PlaywrightEngine {
await context.tracing.stop({
path: initialContext.vars.__tracePath
});
events.emit('counter', 'browser.traces_collected', 1);
} else {
await context.tracing.stop();
events.emit('counter', 'browser.traces_discarded', 1);
}
}

Expand Down

0 comments on commit 533b301

Please sign in to comment.