Skip to content

Commit

Permalink
metrics warnings (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored Aug 28, 2022
1 parent 1f37839 commit 5788287
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sdk/include/opentelemetry/sdk/metrics/instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once
#ifndef ENABLE_METRICS_PREVIEW
# include <functional>
# include "opentelemetry/common/macros.h"
# include "opentelemetry/sdk/common/attribute_utils.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
Expand Down Expand Up @@ -61,7 +62,7 @@ struct InstrumentDescriptor

using MetricAttributes = opentelemetry::sdk::common::OrderedAttributeMap;
using AggregationTemporalitySelector = std::function<AggregationTemporality(InstrumentType)>;
static InstrumentClass GetInstrumentClass(InstrumentType type)
OPENTELEMETRY_MAYBE_UNUSED static InstrumentClass GetInstrumentClass(InstrumentType type)
{
if (type == InstrumentType::kCounter || type == InstrumentType::kHistogram ||
type == InstrumentType::kUpDownCounter)
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/async_metric_storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ TEST_P(WritableMetricStorageTestFixture, TestAggregation)
std::shared_ptr<CollectorHandle> collector(new MockCollectorHandle(temporality));
std::vector<std::shared_ptr<CollectorHandle>> collectors;
collectors.push_back(collector);
size_t count_attributes = 0;

std::unique_ptr<AttributesProcessor> default_attributes_processor{
new DefaultAttributesProcessor{}};
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/metric_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class MockMetricReader : public MetricReader

TEST(MetricReaderTest, BasicTests)
{
AggregationTemporality aggr_temporality = AggregationTemporality::kDelta;
std::unique_ptr<MetricReader> metric_reader1(new MockMetricReader());
EXPECT_EQ(metric_reader1->GetAggregationTemporality(InstrumentType::kCounter),
AggregationTemporality::kCumulative);
Expand Down

2 comments on commit 5788287

@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: 5788287 Previous: 1f37839 Ratio
BM_ProcYieldSpinLockThrashing/1/process_time/real_time 0.24560122262863887 ms/iter 0.11119767436831016 ms/iter 2.21
BM_NaiveSpinLockThrashing/1/process_time/real_time 0.6419114878612199 ms/iter 0.1110088769607188 ms/iter 5.78

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

@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: 5788287 Previous: 1f37839 Ratio
BM_LockFreeBuffer/1 3712033.748626709 ns/iter 339348.5279907127 ns/iter 10.94

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

Please sign in to comment.