Skip to content

Don't move a constant AttributeValue - #141

Merged
reyang merged 2 commits into
open-telemetry:masterfrom
pyohannes:const-attribute-value
Jul 10, 2020
Merged

reyang merged 2 commits into
open-telemetry:masterfrom
pyohannes:const-attribute-value

Conversation

@pyohannes

Copy link
Copy Markdown
Contributor

Moving a constant object causes a copy to be made. Let's rather pass a reference.

Related to this comment.

@pyohannes
pyohannes requested a review from a team June 30, 2020 21:14
@codecov

codecov Bot commented Jun 30, 2020

Copy link
Copy Markdown

Codecov Report

Merging #141 into master will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #141      +/-   ##
==========================================
+ Coverage   93.75%   94.11%   +0.36%     
==========================================
  Files          74       74              
  Lines        1792     1802      +10     
==========================================
+ Hits         1680     1696      +16     
+ Misses        112      106       -6     
Impacted Files Coverage Δ
api/include/opentelemetry/trace/noop.h 57.69% <ø> (+7.69%) ⬆️
api/include/opentelemetry/trace/span.h 100.00% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/recordable.h 100.00% <ø> (ø)
sdk/src/trace/span.h 0.00% <ø> (ø)
api/test/trace/noop_test.cc 100.00% <100.00%> (ø)
sdk/include/opentelemetry/sdk/trace/span_data.h 100.00% <100.00%> (ø)
sdk/src/trace/span.cc 65.51% <100.00%> (+6.89%) ⬆️
sdk/test/trace/tracer_test.cc 97.64% <100.00%> (+0.27%) ⬆️

@pyohannes
pyohannes force-pushed the const-attribute-value branch 2 times, most recently from 637bf1d to 0e25607 Compare July 8, 2020 23:39

@reyang reyang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pyohannes
pyohannes force-pushed the const-attribute-value branch from 2597ec8 to 1438b2e Compare July 10, 2020 17:18
@reyang
reyang merged commit 9aa4797 into open-telemetry:master Jul 10, 2020
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Jun 17, 2025
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.

3 participants