Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

fix: emit copy of metrics #1

Merged
merged 1 commit into from
Sep 20, 2023
Merged

fix: emit copy of metrics #1

merged 1 commit into from
Sep 20, 2023

Conversation

achingbrain
Copy link
Member

To prevent observers changing internal state, emit a copy of the metrics.

To prevent observers changing internal state, emit a copy of the metrics.
@achingbrain achingbrain merged commit ede5c64 into main Sep 20, 2023
18 checks passed
@achingbrain achingbrain deleted the fix/emit-metrics-copy branch September 20, 2023 09:29
github-actions bot pushed a commit that referenced this pull request Sep 20, 2023
## 1.0.0 (2023-09-20)

### Features

* initial import ([dda8a8a](dda8a8a))

### Bug Fixes

* emit copy of metrics ([#1](#1)) ([ede5c64](ede5c64))

### Trivial Changes

* add release script ([107ee5e](107ee5e))
* Update .github/workflows/semantic-pull-request.yml [skip ci] ([8175453](8175453))
* Update .github/workflows/stale.yml [skip ci] ([0705c63](0705c63))
* update project config ([6510681](6510681))
@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -158,7 +158,7 @@ class SimpleMetrics implements Metrics, Startable {
}
}

this.onMetrics(output)
this.onMetrics(JSON.parse(JSON.stringify(output)))
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason - PR please!

Copy link
Member Author

Choose a reason for hiding this comment

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

That said, JSON stringify/parse seems to be faster? - benchmark

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants