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

Add: linux time wheel #38

Merged
merged 5 commits into from
Jan 20, 2021
Merged

Add: linux time wheel #38

merged 5 commits into from
Jan 20, 2021

Conversation

AlexStocks
Copy link
Collaborator

@AlexStocks AlexStocks commented Dec 10, 2020

What this PR does:

Add:
1 linux time wheel

@AlexStocks AlexStocks force-pushed the feature/timer_wheel branch 16 times, most recently from 12d4ca7 to 3dfe826 Compare December 11, 2020 06:04
@AlexStocks AlexStocks force-pushed the master branch 6 times, most recently from 6c62af0 to d5cb050 Compare December 13, 2020 16:21
time/timer.go Outdated Show resolved Hide resolved
time/timer.go Outdated Show resolved Hide resolved
time/timer.go Show resolved Hide resolved
@AlexStocks AlexStocks changed the title Add: xorlist & linux time wheel Add: linux time wheel Dec 25, 2020
@codecov-io
Copy link

codecov-io commented Dec 25, 2020

Codecov Report

Merging #38 (36bb08b) into master (4e3d8d4) will increase coverage by 0.47%.
The diff coverage is 69.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   78.42%   78.90%   +0.47%     
==========================================
  Files          26       29       +3     
  Lines        2364     2816     +452     
==========================================
+ Hits         1854     2222     +368     
- Misses        411      476      +65     
- Partials       99      118      +19     
Impacted Files Coverage Δ
bytes/bytes_pool.go 96.42% <ø> (ø)
time/ticker.go 15.38% <15.38%> (ø)
time/sleep.go 19.04% <19.04%> (ø)
time/timer.go 76.42% <76.42%> (ø)
context/context.go 76.92% <0.00%> (-9.75%) ⬇️
runtime/sys.go 48.71% <0.00%> (+0.44%) ⬆️
math/big/decimal.go 86.58% <0.00%> (+1.01%) ⬆️
... 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 4e3d8d4...36bb08b. Read the comment docs.

container/xorlist/xorlist.go Outdated Show resolved Hide resolved
time/sleep.go Show resolved Hide resolved
time/timer.go Outdated Show resolved Hide resolved
time/timer.go Outdated Show resolved Hide resolved
time/timer.go Outdated Show resolved Hide resolved
time/timer.go Show resolved Hide resolved
@hound hound bot deleted a comment from wongoo Jan 10, 2021
@wongoo
Copy link
Contributor

wongoo commented Jan 11, 2021

@AlexStocks how about open a online meeting to explain the code for reviewers?

Copy link

@Patrick0308 Patrick0308 left a comment

Choose a reason for hiding this comment

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

Why can not see time wheel in Files changed?

time/sleep.go Outdated Show resolved Hide resolved
time/sleep.go Outdated Show resolved Hide resolved
@AlexStocks AlexStocks force-pushed the feature/timer_wheel branch 7 times, most recently from b646989 to 7d149de Compare January 17, 2021 13:45
type TimerType int32

const (
TimerOnce TimerType = 0x1 << 0
Copy link

Choose a reason for hiding this comment

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

exported const TimerOnce should have comment (or a comment on this block) or be unexported

})
}

func GetDefaultTimerWheel() *TimerWheel {
Copy link

Choose a reason for hiding this comment

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

exported function GetDefaultTimerWheel should have comment or be unexported

var (
// nolint
ErrTimeChannelFull = errors.New("timer channel full")
// nolint
Copy link

Choose a reason for hiding this comment

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

comment on exported var ErrTimeChannelClosed should be of the form "ErrTimeChannelClosed ..."

)

var (
// nolint
Copy link

Choose a reason for hiding this comment

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

comment on exported var ErrTimeChannelFull should be of the form "ErrTimeChannelFull ..."

@watermelo watermelo self-requested a review January 20, 2021 15:11
@AlexStocks AlexStocks merged commit 2ec6eca into master Jan 20, 2021
@watermelo watermelo self-requested a review January 23, 2021 12:34
AlexStocks added a commit that referenced this pull request Jan 24, 2021
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.

6 participants