Skip to content

Conversation

@michielp1807
Copy link
Contributor

@michielp1807 michielp1807 commented Oct 2, 2024

This PR allows the delay property of measurements to be either NtpDuration or (). If the delay is (), we use a constant value as the estimate of the measurement noise instead of an estimate based on the variance of delay values. This is useful for supporting alternative time sources, such as the SOCK protocol (#1632).

The functions for creating a SOCK source are currently not covered by unit tests. I will add unit tests for these functions in a separate PR together with the actual implementation of the SOCK source.

@codecov
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 72.58065% with 68 lines in your changes missing coverage. Please review.

Project coverage is 81.30%. Comparing base (eba70a7) to head (75b6894).
Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
ntpd/src/force_sync/algorithm.rs 0.00% 32 Missing ⚠️
ntp-proto/src/algorithm/kalman/mod.rs 40.00% 12 Missing ⚠️
ntp-proto/src/system.rs 45.00% 11 Missing ⚠️
ntpd/src/daemon/system.rs 0.00% 6 Missing ⚠️
ntp-proto/src/algorithm/kalman/source.rs 97.36% 4 Missing ⚠️
ntp-proto/src/source.rs 81.25% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1673      +/-   ##
==========================================
- Coverage   81.33%   81.30%   -0.03%     
==========================================
  Files          64       64              
  Lines       19751    19780      +29     
==========================================
+ Hits        16065    16083      +18     
- Misses       3686     3697      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@davidv1992 davidv1992 left a comment

Choose a reason for hiding this comment

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

Some choices around type leaking that I don't agree with. The actual logic changes seem ok though.

@davidv1992 davidv1992 closed this Dec 5, 2024
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