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

OCPBUGS-19056: UPSTREAM: <carry>: optimize IsLongRunningRequest #1705

Closed
wants to merge 1 commit into from

Conversation

vrutkovs
Copy link
Member

Avoid using expensive MatchString when request params are already set in requestInfo

Back in 3.x days this was necessary as buildconfigs and imagestreams was served under /oapi, but now they are proper CRs so its better to match them via requestInfo params

$ benchstat -delta-test=none old.txt new.txt               
name                                                                 old time/op  new time/op  delta
IsLongRunningRequest/path_/api-8                                     11.5ns ± 5%   9.9ns ± 8%  -14.20%
IsLongRunningRequest/path_/api/buildconfigs/foo/instantiatebinary-8   870ns ± 7%     6ns ± 9%  -99.32%
IsLongRunningRequest/path_/api/imagestreamimports-8                   391ns ± 3%    10ns ± 5%  -97.47%

Avoid using expensive MatchString when request params are already set in requestInfo

Back in 3.x days this was necessary as buildconfigs and imagestreams was served under `/oapi`, but now they are proper CRs so its better to match them via requestInfo params
@openshift-ci-robot openshift-ci-robot added backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Sep 15, 2023
@openshift-ci-robot
Copy link

@vrutkovs: This pull request references Jira Issue OCPBUGS-19056, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @wangke19

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Avoid using expensive MatchString when request params are already set in requestInfo

Back in 3.x days this was necessary as buildconfigs and imagestreams was served under /oapi, but now they are proper CRs so its better to match them via requestInfo params

$ benchstat -delta-test=none old.txt new.txt               
name                                                                 old time/op  new time/op  delta
IsLongRunningRequest/path_/api-8                                     11.5ns ± 5%   9.9ns ± 8%  -14.20%
IsLongRunningRequest/path_/api/buildconfigs/foo/instantiatebinary-8   870ns ± 7%     6ns ± 9%  -99.32%
IsLongRunningRequest/path_/api/imagestreamimports-8                   391ns ± 3%    10ns ± 5%  -97.47%

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 15, 2023
@openshift-ci-robot
Copy link

@vrutkovs: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@vrutkovs
Copy link
Member Author

/cc @benluddy @deads2k @tkashem

@openshift-ci-robot
Copy link

@vrutkovs: This pull request references Jira Issue OCPBUGS-19056. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

In response to this:

Avoid using expensive MatchString when request params are already set in requestInfo

Back in 3.x days this was necessary as buildconfigs and imagestreams was served under /oapi, but now they are proper CRs so its better to match them via requestInfo params

$ benchstat -delta-test=none old.txt new.txt               
name                                                                 old time/op  new time/op  delta
IsLongRunningRequest/path_/api-8                                     11.5ns ± 5%   9.9ns ± 8%  -14.20%
IsLongRunningRequest/path_/api/buildconfigs/foo/instantiatebinary-8   870ns ± 7%     6ns ± 9%  -99.32%
IsLongRunningRequest/path_/api/imagestreamimports-8                   391ns ± 3%    10ns ± 5%  -97.47%

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested a review from soltysh September 15, 2023 11:16
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Sep 15, 2023
@openshift-ci
Copy link

openshift-ci bot commented Sep 15, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vrutkovs
Once this PR has been reviewed and has the lgtm label, please assign soltysh for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants