-
Notifications
You must be signed in to change notification settings - Fork 160
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
remove error log pre-allocation and add benchmark #89
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JaSei
approved these changes
Apr 21, 2023
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.
Looks good, and code is clearer. Thank you for the PR.
JaSei
approved these changes
Aug 3, 2023
Merged
kodiakhq bot
referenced
this pull request
in cloudquery/plugin-pb-go
Sep 1, 2023
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/avast/retry-go/v4](https://togithub.com/avast/retry-go) | require | minor | `v4.3.4` -> `v4.5.0` | --- ### Release Notes <details> <summary>avast/retry-go (github.com/avast/retry-go/v4)</summary> ### [`v4.5.0`](https://togithub.com/avast/retry-go/releases/tag/v4.5.0) [Compare Source](https://togithub.com/avast/retry-go/compare/4.4.0...4.5.0) #### What's Changed - Allow last error to be returned with context error by [@​willdot](https://togithub.com/willdot) in [https://github.com/avast/retry-go/pull/96](https://togithub.com/avast/retry-go/pull/96) #### New Contributors - [@​willdot](https://togithub.com/willdot) made their first contribution in [https://github.com/avast/retry-go/pull/96](https://togithub.com/avast/retry-go/pull/96) **Full Changelog**: avast/retry-go@4.4.0...v4.5.0 ### [`v4.4.0`](https://togithub.com/avast/retry-go/releases/tag/v4.4.0): (generic support) [Compare Source](https://togithub.com/avast/retry-go/compare/4.3.4...4.4.0) #### What's Changed - Go versions by [@​JaSei](https://togithub.com/JaSei) in [https://github.com/avast/retry-go/pull/97](https://togithub.com/avast/retry-go/pull/97) - fix: markdown code block format by [@​mrtc0](https://togithub.com/mrtc0) in [https://github.com/avast/retry-go/pull/93](https://togithub.com/avast/retry-go/pull/93) - remove error log pre-allocation and add benchmark by [@​dillonstreator](https://togithub.com/dillonstreator) in [https://github.com/avast/retry-go/pull/89](https://togithub.com/avast/retry-go/pull/89) - Add DoWithData function by [@​craigpastro](https://togithub.com/craigpastro) in [https://github.com/avast/retry-go/pull/91](https://togithub.com/avast/retry-go/pull/91) #### New Contributors - [@​mrtc0](https://togithub.com/mrtc0) made their first contribution in [https://github.com/avast/retry-go/pull/93](https://togithub.com/avast/retry-go/pull/93) - [@​dillonstreator](https://togithub.com/dillonstreator) made their first contribution in [https://github.com/avast/retry-go/pull/89](https://togithub.com/avast/retry-go/pull/89) - [@​craigpastro](https://togithub.com/craigpastro) made their first contribution in [https://github.com/avast/retry-go/pull/91](https://togithub.com/avast/retry-go/pull/91) **Full Changelog**: avast/retry-go@4.3.4...v4.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNzguMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes
errorLog
slice pre-allocation with the assumption that most calls toretry.Do
don't actually require retry. If this is wishful thinking, please let me know. Aside from the readability win, the benchmarks that I added show improvement around allocations & cpu cycles when no errors are encountered, as expected.Here are the results of the benchmarks that this PR introduces: