Remove hardcoded b.N rewrite in BenchmarkRawNode#367
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: logica0419 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @logica0419. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
@logica0419, thanks for the pull request. Could you squash your commits and sign them off so the DCO check passes? Thanks. i.e., you could do it with: |
c9d7bd3 to
401bb79
Compare
|
@ivanvc |
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
401bb79 to
3fcaf5a
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds a -debug flag to control benchmark logging and wires it into BenchmarkRawNode so benchmark runs can optionally emit detailed Ready/message output.
Changes:
- Introduced a package-level
-debugflag for tests/benchmarks. - Switched benchmark logging and logger suppression in
benchmarkRawNodeImplto use the new flag. - Removed the prior “debug mode forces
b.N = 1” behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| util_test.go | Adds a global -debug flag for controlling benchmark logging. |
| rawnode_test.go | Uses the shared debug flag to toggle benchmark logging and logger configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var applied uint64 | ||
| for i := 0; i < b.N; i++ { | ||
| if err := rn.Propose([]byte("foo")); err != nil { |
There was a problem hiding this comment.
I think this is a valid comment. Can you resolve this comment?
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: logica0419 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
| if debug { | ||
| // nolint:staticcheck | ||
| b.N = 1 | ||
| } |
There was a problem hiding this comment.
I think we need to keep this code
fix #313
Additional Context
The implementation is based on #313 (comment).