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

fix: The cpu usage is too high. #5

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Conversation

misu99
Copy link

@misu99 misu99 commented Oct 29, 2022

syncer_loki.go line 221,
'default' -- 'syncer.buffer.len() >= syncer.maxBatchSize', If the condition is not met, it will fall into an infinite loop.
Add a row of sleep, 'time.Sleep(time.Duration(10) * time.Millisecond)'

图片

图片

syncer_loki.go line 221, 'default' -- 'syncer.buffer.len() >= syncer.maxBatchSize', If the condition is not met, it will fall into an infinite loop.
Add a row of sleep 'time.Sleep(time.Duration(10) * time.Millisecond)'
@dongxuny
Copy link
Contributor

LGTM

@codecov-commenter
Copy link

Codecov Report

Merging #5 (1ccafcb) into master (69ef586) will decrease coverage by 0.17%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
- Coverage   86.83%   86.65%   -0.18%     
==========================================
  Files           2        2              
  Lines         486      487       +1     
==========================================
  Hits          422      422              
- Misses         48       49       +1     
  Partials       16       16              
Impacted Files Coverage Δ
syncer_loki.go 76.87% <0.00%> (-0.45%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dongxuny dongxuny merged commit 85519bd into rookie-ninja:master Oct 30, 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.

3 participants