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

refactor(timer): use polymorphism to eliminate conditions #264

Merged
merged 1 commit into from
Sep 19, 2022
Merged

refactor(timer): use polymorphism to eliminate conditions #264

merged 1 commit into from
Sep 19, 2022

Conversation

hwjiangkai
Copy link
Contributor

What problem does this PR solve?

optimize code logic to improve performance

Issue Number: close #236

Problem Summary

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #264 (23018e3) into main (ca600ab) will increase coverage by 0.58%.
The diff coverage is 84.69%.

❗ Current head 23018e3 differs from pull request most recent head 1bb2361. Consider uploading reports for the commit 1bb2361 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #264      +/-   ##
==========================================
+ Coverage   64.00%   64.58%   +0.58%     
==========================================
  Files         129      129              
  Lines       11575    11676     +101     
==========================================
+ Hits         7408     7541     +133     
+ Misses       3643     3611      -32     
  Partials      524      524              
Impacted Files Coverage Δ
...al/controller/trigger/subscription/subscription.go 64.58% <0.00%> (-4.31%) ⬇️
internal/trigger/reader/reader.go 66.66% <66.66%> (+1.96%) ⬆️
internal/trigger/trigger/trigger.go 79.03% <72.00%> (-0.58%) ⬇️
internal/controller/trigger/controller.go 39.54% <72.72%> (+0.88%) ⬆️
internal/timer/timingwheel/timingwheel.go 89.32% <90.47%> (+9.63%) ⬆️
internal/controller/trigger/worker/worker.go 83.11% <100.00%> (-0.15%) ⬇️
internal/gateway/gateway.go 69.60% <100.00%> (-0.30%) ⬇️
internal/timer/timingwheel/bucket.go 100.00% <100.00%> (+0.97%) ⬆️
internal/trigger/transform/transformer.go 100.00% <100.00%> (+6.12%) ⬆️
... and 3 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 ca600ab...1bb2361. Read the comment docs.

internal/timer/timingwheel/bucket.go Outdated Show resolved Hide resolved
internal/timer/timingwheel/bucket.go Outdated Show resolved Hide resolved
@ifplusor ifplusor changed the title refactor(timer): optimize code logic to improve performance refactor(timer): use polymorphism to eliminate conditions Sep 19, 2022
Copy link
Collaborator

@ifplusor ifplusor left a comment

Choose a reason for hiding this comment

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

LGTM

@hwjiangkai hwjiangkai merged commit 761acee into vanus-labs:main Sep 19, 2022
@JieDing JieDing added this to the v0.4 milestone Oct 29, 2022
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.

Optimize code logic to improve performance
3 participants