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

fix: encoder compress timestamp #272

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

muktihari
Copy link
Owner

@muktihari muktihari commented May 16, 2024

Encoder

  • Fix compress timestamp in header:
    Previously, we measure rollover event every > 32 seconds where it should be >= 32 seconds. This created the 32 seconds rollover to have timeoffset 0. When this message is decoded, most likely this message would have the same timestamp as the previously decoded message (at least our FIT SDK's decoder handle this way).
  • Fix lru on ResetWithSize
    Previously, when reset with new size > than previous size, only items field would be re-allocated as the new size where bucket will be allocated automatically by append. This does no create any significant issue, however, this was not intended since cap(bucket) can be bigger than cap(items) as append will typically re-allocate doubling the previous cap or round it in a multiple of 8: 8, 16, etc (depend on runtime implementation)
  • RolloverEvent is removed as it no longer needed. Moreover, exporting RolloverEvent was a mistake.

@muktihari muktihari self-assigned this May 16, 2024
@muktihari muktihari added the bug Something isn't working label May 16, 2024
@muktihari muktihari merged commit bc29ecf into master May 16, 2024
4 checks passed
@muktihari muktihari deleted the fix/encoder-compress-timestamp branch May 16, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant