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

feat(croncontroller): Implement heap-based Schedule #95

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

irvinlim
Copy link
Member

@irvinlim irvinlim commented Jul 7, 2022

Improves the performance of the CronController by switching to a min-heap instead of iterating all JobConfigs every second.

@irvinlim irvinlim added component/execution Issues or PRs related exclusively to the Execution component (Job, JobConfig) kind/feature Categorizes issue or PR as related to a new, well-defined and agreed-upon feature. area/scheduling Related to execution scheduling (e.g. cron, concurrency, etc) labels Jul 7, 2022
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #95 (322f328) into main (6d36ac5) will increase coverage by 0.15%.
The diff coverage is 80.10%.

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   63.35%   63.50%   +0.15%     
==========================================
  Files         203      205       +2     
  Lines       10735    10958     +223     
==========================================
+ Hits         6801     6959     +158     
- Misses       3571     3621      +50     
- Partials      363      378      +15     
Impacted Files Coverage Δ
...execution/controllers/croncontroller/controller.go 24.00% <0.00%> (-1.00%) ⬇️
...xecution/controllers/croncontroller/cron_worker.go 66.48% <70.87%> (-4.77%) ⬇️
pkg/execution/util/schedule/schedule.go 75.72% <75.72%> (ø)
pkg/utils/heap/heap.go 98.92% <98.92%> (ø)
pkg/execution/util/schedule/option.go 100.00% <100.00%> (ø)
...kg/execution/controllers/croncontroller/metrics.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/runtime/reconciler/metrics.go 42.10% <0.00%> (-26.32%) ⬇️
pkg/execution/controllers/croncontroller/ticker.go 87.50% <0.00%> (-12.50%) ⬇️

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 6d36ac5...322f328. Read the comment docs.

@irvinlim irvinlim requested a review from qingyuanz July 8, 2022 05:02
@qingyuanz
Copy link

LGTM!

@irvinlim irvinlim merged commit 1b0ba70 into main Jul 12, 2022
@irvinlim irvinlim deleted the irvinlim/feat/schedule-heap branch July 12, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scheduling Related to execution scheduling (e.g. cron, concurrency, etc) component/execution Issues or PRs related exclusively to the Execution component (Job, JobConfig) kind/feature Categorizes issue or PR as related to a new, well-defined and agreed-upon feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants