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

reuse runtimeAPIClient.buffer #325

Merged
merged 3 commits into from Oct 3, 2020

Conversation

shogo82148
Copy link
Contributor

Issue #, if available:

runtimeAPIClient.buffer is defined on here

buffer *bytes.Buffer

but it is never used.

Description of changes:

runtimeAPIClient.next() is never called concurrently, so we can reuse runtimeAPIClient.buffer.
It avoids extra re-allocation.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2020

Codecov Report

Merging #325 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #325   +/-   ##
=======================================
  Coverage   72.46%   72.46%           
=======================================
  Files          18       18           
  Lines         730      730           
=======================================
  Hits          529      529           
  Misses        136      136           
  Partials       65       65           
Impacted Files Coverage Δ
lambda/runtime_api_client.go 75.00% <100.00%> (ø)

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 308c17f...8602473. Read the comment docs.

@bmoffatt
Copy link
Collaborator

Nice catch, thanks! This was the original intent, but I think I missed it during an internal refactor :)

@bmoffatt bmoffatt merged commit 6b93d48 into aws:master Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants