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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nexus): add sampled history #6492

Merged
merged 2 commits into from
Oct 24, 2023
Merged

feat(nexus): add sampled history #6492

merged 2 commits into from
Oct 24, 2023

Conversation

kptkin
Copy link
Contributor

@kptkin kptkin commented Oct 24, 2023

Description

  • Fixes WB-NNNNN
  • Fixes #NNNN

What does the PR do?

馃 Generated by Copilot at 3626270

This pull request adds a sampled history feature to the nexus service, which allows clients to query a random subset of history records for a given key. It implements a reservoir sampling algorithm in the ReservoirSampling type and the sampleHistory method, and exposes a new endpoint in the handleSampledHistory method in the handler.go file.

Testing

How was this PR tested?

馃 Generated by Copilot at 3626270

To query the nexus service faster
We added a new field and method
The ReservoirSampling type
Uses a clever algorithmic hype
To store and return a sampled history master

@github-actions github-actions bot added cc-feat and removed cc-feat labels Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #6492 (3626270) into main (e7ec02b) will decrease coverage by 0.14%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6492      +/-   ##
==========================================
- Coverage   77.22%   77.08%   -0.14%     
==========================================
  Files         387      387              
  Lines       44928    45007      +79     
==========================================
- Hits        34694    34693       -1     
- Misses      10181    10261      +80     
  Partials       53       53              
Flag Coverage 螖
unittest 81.21% <酶> (-0.01%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage 螖
nexus/pkg/server/handler.go 0.00% <0.00%> (酶)
nexus/pkg/server/history.go 0.00% <0.00%> (酶)

... and 21 files with indirect coverage changes

@dmitryduev dmitryduev marked this pull request as ready for review October 24, 2023 19:46
@dmitryduev dmitryduev requested a review from a team as a code owner October 24, 2023 19:46
@dmitryduev dmitryduev merged commit cbc81fc into main Oct 24, 2023
17 of 67 checks passed
@dmitryduev dmitryduev deleted the sample-history branch October 24, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants