-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use binary search in getLineIndex method #4151
Use binary search in getLineIndex method #4151
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4151 +/- ##
==========================================
+ Coverage 46.18% 46.19% +0.01%
==========================================
Files 194 194
Lines 8999 8999
Branches 83 83
==========================================
+ Hits 4156 4157 +1
+ Misses 4587 4586 -1
Partials 256 256
Continue to review full report at Codecov.
|
@@ -47,6 +48,40 @@ var log5 = logs.LogLine{ | |||
Content: "log5", | |||
} | |||
|
|||
var details *logs.LogDetails | |||
|
|||
func benchmarkGetLogDetails(lines int, timestamp string, b *testing.B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC benchmarks are not executed as part of the test spec by default (they need -bench
arg). It's a nice addition though. Have you compared old implementation performance of getLineIndex
with the new one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@floreks Yes I compared the performance. The summary is here: #3900 (comment).
Overall, there's a negligible speedup.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eloyekunle, maciaszczykm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes #3900