Skip to content

Commit

Permalink
MetricStorage dtors (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored Mar 18, 2022
1 parent 0b1a74c commit 6bd2f96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@
/build

tags
.cache/clangd/*
3 changes: 3 additions & 0 deletions sdk/include/opentelemetry/sdk/metrics/state/metric_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class MetricStorage
opentelemetry::sdk::instrumentationlibrary::InstrumentationLibrary *instrumentation_library,
opentelemetry::sdk::resource::Resource *resource,
nostd::function_ref<bool(MetricData &)> callback) noexcept = 0;

virtual ~MetricStorage() = default;
};

class WritableMetricStorage
Expand All @@ -38,6 +40,7 @@ class WritableMetricStorage

virtual void RecordDouble(double value,
const opentelemetry::common::KeyValueIterable &attributes) noexcept = 0;
virtual ~WritableMetricStorage() = default;
};

class NoopMetricStorage : public MetricStorage
Expand Down

1 comment on commit 6bd2f96

@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 api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 6bd2f96 Previous: 0b1a74c Ratio
BM_ProcYieldSpinLockThrashing/2/process_time/real_time 0.6938519016388924 ms/iter 0.21575455285288805 ms/iter 3.22

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

Please sign in to comment.