Skip to content

Commit

Permalink
[BUILD] Fix build for esp32 (#3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
albkharisov authored Nov 24, 2024
1 parent c1ef416 commit 31956f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sdk/include/opentelemetry/sdk/common/empty_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ namespace sdk
* with default attributes.
*/
static const opentelemetry::common::KeyValueIterableView<
std::array<std::pair<std::string, int>, 0>> &
std::array<std::pair<std::string, int32_t>, 0>> &
GetEmptyAttributes() noexcept
{
static const std::array<std::pair<std::string, int>, 0> array{};
static const std::array<std::pair<std::string, int32_t>, 0> array{};
static const opentelemetry::common::KeyValueIterableView<
std::array<std::pair<std::string, int>, 0>>
std::array<std::pair<std::string, int32_t>, 0>>
kEmptyAttributes(array);

return kEmptyAttributes;
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/opentelemetry/sdk/trace/span_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class SpanData final : public Recordable
opentelemetry::common::SystemTimestamp timestamp =
opentelemetry::common::SystemTimestamp(std::chrono::system_clock::now()),
const opentelemetry::common::KeyValueIterable &attributes =
opentelemetry::common::KeyValueIterableView<std::map<std::string, int>>(
opentelemetry::common::KeyValueIterableView<std::map<std::string, int32_t>>(
{})) noexcept override
{
SpanDataEvent event(std::string(name), timestamp, attributes);
Expand Down

3 comments on commit 31956f8

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 31956f8 Previous: c1ef416 Ratio
BM_BaselineBuffer/2 10192482.471466064 ns/iter 5063855.6480407715 ns/iter 2.01

This comment was automatically generated by workflow using github-action-benchmark.

@albkharisov
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marcalff , performance alert, what do you think about it?

@marcalff
Copy link
Member

Choose a reason for hiding this comment

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

Nothing ;-)

These reports are highly unreliable, measuring more the room temperature of the github worker that the code actually used in the benchmark.

Some test in the SDK certainly did not degrade by a factor 2 just by changing sizeof(int) = 4 to sizeof(int32_t) = 4, in a code path not even used in the test.

Please sign in to comment.