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

statistics: introduce TopN #1998

Merged
merged 5 commits into from
Dec 10, 2019
Merged

statistics: introduce TopN #1998

merged 5 commits into from
Dec 10, 2019

Conversation

Luffbee
Copy link
Contributor

@Luffbee Luffbee commented Dec 9, 2019

What problem does this PR solve?

First step of issue #1997 .

What is changed and how it works?

Add TopN, a container maintaining top-N items with TTL-based GC.

Check List

Tests

  • Unit test

@Luffbee Luffbee added the component/schedule Scheduling logic. label Dec 9, 2019
@Luffbee Luffbee added this to the v4.0.0-beta milestone Dec 9, 2019
@Luffbee Luffbee requested review from lhy1024 and nolouch December 9, 2019 11:43
@codecov-io
Copy link

codecov-io commented Dec 9, 2019

Codecov Report

Merging #1998 into master will increase coverage by 0.18%.
The diff coverage is 99.4%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1998      +/-   ##
==========================================
+ Coverage   77.56%   77.74%   +0.18%     
==========================================
  Files         178      179       +1     
  Lines       18240    18407     +167     
==========================================
+ Hits        14147    14310     +163     
- Misses       3013     3015       +2     
- Partials     1080     1082       +2
Impacted Files Coverage Δ
server/statistics/topn.go 100% <100%> (ø)
server/statistics/util.go 96.15% <75%> (-3.85%) ⬇️
server/kv/etcd_kv.go 75.32% <0%> (-9.1%) ⬇️
server/schedulers/random_merge.go 61.81% <0%> (-3.64%) ⬇️
client/client.go 71.28% <0%> (-0.83%) ⬇️
server/grpc_service.go 58.53% <0%> (-0.44%) ⬇️
server/handler.go 52.83% <0%> (+0.47%) ⬆️
server/member/leader.go 78.57% <0%> (+0.51%) ⬆️
server/region_syncer/client.go 82.89% <0%> (+3.94%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 676ddd3...c845113. Read the comment docs.

@disksing
Copy link
Contributor

disksing commented Dec 9, 2019

the rest LGTM.

@nolouch nolouch added the status/can-merge Indicates a PR has been approved by a committer. label Dec 10, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Dec 10, 2019

/run-all-tests

@sre-bot sre-bot merged commit 73fd941 into tikv:master Dec 10, 2019
@Luffbee Luffbee deleted the topn branch December 11, 2019 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/schedule Scheduling logic. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants