Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Aggregate worker metrics in background #355

Merged
merged 3 commits into from Nov 1, 2023

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Nov 1, 2023

Previously, we would need to manually send the metric data to the main thread, then write the metric there. This PR updates worker metrics so it is done seamlessly in the background, metrics can be written as normal regardless of whether in the main thread or not. This is achieved by sending all metrics collected within a worker to the main thread, and then aggregating them there.

@morgsmccauley morgsmccauley requested a review from a team as a code owner November 1, 2023 20:02

export default class StreamHandler {
private readonly worker?: Worker;
private readonly worker: Worker;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always be defined, otherwise the constructor will throw

@morgsmccauley morgsmccauley merged commit 35bc949 into main Nov 1, 2023
3 checks passed
@morgsmccauley morgsmccauley deleted the aggregate-worker-metrics branch November 1, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants