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

Improve Singleflight performance #580

Merged
merged 28 commits into from
Aug 3, 2020
Merged

Conversation

hlts2
Copy link
Collaborator

@hlts2 hlts2 commented Jul 15, 2020

Signed-off-by: hlts2 hiroto.funakoshi.hiroto@gmail.com

Description:

I fixed singleflight logic.
The following is related issue.

TODO

  • If you get an approve from author, I will delete the benchmark code and result files and replace the original implementation.

#577

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.14.4
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.0

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@github-actions github-actions bot removed the size/L label Jul 15, 2020
@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #580 into master will increase coverage by 4.31%.
The diff coverage is 28.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #580      +/-   ##
==========================================
+ Coverage    7.84%   12.15%   +4.31%     
==========================================
  Files         388      407      +19     
  Lines       19945    21254    +1309     
==========================================
+ Hits         1565     2584    +1019     
- Misses      18156    18388     +232     
- Partials      224      282      +58     
Impacted Files Coverage Δ
internal/cache/cacher/cacher.go 100.00% <ø> (+100.00%) ⬆️
internal/client/discoverer/discover.go 0.00% <0.00%> (ø)
internal/compress/gob.go 26.19% <0.00%> (-1.31%) ⬇️
internal/compress/gzip.go 26.98% <0.00%> (-7.02%) ⬇️
internal/compress/lz4.go 36.36% <0.00%> (-5.31%) ⬇️
internal/compress/zstd.go 29.50% <0.00%> (-5.79%) ⬇️
internal/config/blob.go 0.00% <0.00%> (ø)
internal/config/config.go 15.78% <ø> (+15.78%) ⬆️
internal/config/grpc.go 0.00% <0.00%> (ø)
internal/config/log.go 100.00% <ø> (+100.00%) ⬆️
... and 162 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 dd59979...7e9bed4. Read the comment docs.

@vankichi
Copy link
Contributor

@hlts2 Could you please confirm related issue at the PR description?

internal/singleflight/singleflight/singleflight.go Outdated Show resolved Hide resolved
internal/singleflight/singleflight/singleflight.go Outdated Show resolved Hide resolved
internal/singleflight/singleflight/singleflight_test.go Outdated Show resolved Hide resolved
internal/singleflight/singleflight/singleflight_test.go Outdated Show resolved Hide resolved
internal/singleflight/singleflight/singleflight_test.go Outdated Show resolved Hide resolved
internal/singleflight/singleflight/singleflight.go Outdated Show resolved Hide resolved
@hlts2 hlts2 changed the title Improve Singleflight performance [WIP] Improve Singleflight performance Jul 15, 2020
@github-actions github-actions bot added size/XL and removed size/XL labels Jul 15, 2020
@github-actions github-actions bot added size/XL and removed size/XL labels Jul 15, 2020
@hlts2
Copy link
Collaborator Author

hlts2 commented Jul 16, 2020

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by hlts2 for branch: core/internal/singleflight

hlts2 and others added 20 commits August 3, 2020 03:05
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Co-authored-by: Kevin Diu <kevin_diu@yahoo.com.hk>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@vdaas-ci vdaas-ci dismissed stale reviews from vankichi and kevindiu via 7e9bed4 August 3, 2020 03:05
@github-actions github-actions bot added the size/L label Aug 3, 2020
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Aug 3, 2020

[FORMAT] Updating license headers and formatting go codes triggered by vankichi.

@github-actions github-actions bot removed the size/L label Aug 3, 2020
Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

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

[APPROVED] This PR is approved by vankichi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants