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

Use binary search in getLineIndex method #4151

Merged
merged 4 commits into from
Aug 20, 2019

Conversation

eloyekunle
Copy link
Contributor

Closes #3900

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 1, 2019
@eloyekunle eloyekunle changed the title [WIP]: Use binary search in getLineIndex method Use binary search in getLineIndex method Aug 1, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 1, 2019
@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #4151 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...p/backend/integration/metric/common/aggregation.go 90.9% <0%> (+1.81%) ⬆️

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 4f15d0e...e74db03. Read the comment docs.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 1, 2019
@@ -47,6 +48,40 @@ var log5 = logs.LogLine{
Content: "log5",
}

var details *logs.LogDetails

func benchmarkGetLogDetails(lines int, timestamp string, b *testing.B) {
Copy link
Member

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?

Copy link
Contributor Author

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.

@maciaszczykm
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 20, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2019
@k8s-ci-robot k8s-ci-robot merged commit f861c0b into kubernetes:master Aug 20, 2019
@eloyekunle eloyekunle deleted the feat/binary-search-logs branch August 27, 2019 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use binary search in getLineIndex method
4 participants