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

metrics: timer: update timer value on read #65

Closed

Conversation

LuskeyNoah
Copy link

The (debug) API memfault_metrics_heartbeat_timer_read does not force an update of the timer value, which means that if it is used while the timer is running, the value read is stale.

This change forces an update when the timer is read.

Noah Luskey added 2 commits November 1, 2023 11:38
…unning

* Add a test that confirms the behavior was broken (Test_TimerHearBeatReadWhileRunning)
* Then fix the behavior and the test passes
@LuskeyNoah LuskeyNoah changed the title Update timer metrics value on read metrics: timer: update timer value on read Nov 1, 2023
@noahp
Copy link
Contributor

noahp commented Nov 2, 2023

Thank you @LuskeyNoah , we'll get this published!

@noahp
Copy link
Contributor

noahp commented Nov 9, 2023

FYI this is scheduled for the upcoming 1.4.3 release, will update here once it's published!

@noahp
Copy link
Contributor

noahp commented Nov 9, 2023

1.4.3 is now published, thanks for the patch!

@noahp noahp closed this Nov 9, 2023
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.

2 participants