Skip to content

Separate metric generation from the browser's core logic #5369

@inancgumus

Description

@inancgumus

What

Similar to #4219, separate k6 metric generation from the browser module's core logic. Instead of pushing metrics from multiple goroutines, create a dedicated goroutine to manage metrics.

Why

  • Prevent race condition issues, such as #5341 and #4203.
  • Reduce flaky test runs, both in k6 runs and CI (i.e., #5367).
  • Separation of concerns.

How

  • Delegate custom metric management to a new type out of the common package.
  • Listen for metric generation events from the core logic and push them to the metric system.
  • Research whether these metrics should be pushed on the event loop and in another dedicated goroutine.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions