Skip to content

Commit

Permalink
fix variable names (#1987)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Feb 17, 2023
1 parent 392c396 commit 01eac4c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions sdk/test/metrics/sync_instruments_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ TEST(SyncInstruments, LongHistogram)
InstrumentDescriptor instrument_descriptor = {
"long_histogram", "description", "1", InstrumentType::kHistogram, InstrumentValueType::kLong};
std::unique_ptr<SyncWritableMetricStorage> metric_storage(new SyncMultiMetricStorage());
LongHistogram<int64_t> counter(instrument_descriptor, std::move(metric_storage));
counter.Record(10, opentelemetry::context::Context{});
counter.Record(-10, opentelemetry::context::Context{}); // This is ignored

counter.Record(10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
opentelemetry::context::Context{});
counter.Record(10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
LongHistogram<int64_t> histogram(instrument_descriptor, std::move(metric_storage));
histogram.Record(10, opentelemetry::context::Context{});
histogram.Record(-10, opentelemetry::context::Context{}); // This is ignored

histogram.Record(10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
opentelemetry::context::Context{});
histogram.Record(10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
}

TEST(SyncInstruments, DoubleHistogram)
Expand All @@ -115,17 +115,17 @@ TEST(SyncInstruments, DoubleHistogram)
InstrumentType::kHistogram,
InstrumentValueType::kDouble};
std::unique_ptr<SyncWritableMetricStorage> metric_storage(new SyncMultiMetricStorage());
DoubleHistogram counter(instrument_descriptor, std::move(metric_storage));
counter.Record(10.10, opentelemetry::context::Context{});
counter.Record(-10.10, opentelemetry::context::Context{}); // This is ignored.
counter.Record(std::numeric_limits<double>::quiet_NaN(),
opentelemetry::context::Context{}); // This is ignored too
counter.Record(std::numeric_limits<double>::infinity(),
opentelemetry::context::Context{}); // This is ignored too

counter.Record(10.10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
opentelemetry::context::Context{});
counter.Record(10.10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
DoubleHistogram histogram(instrument_descriptor, std::move(metric_storage));
histogram.Record(10.10, opentelemetry::context::Context{});
histogram.Record(-10.10, opentelemetry::context::Context{}); // This is ignored.
histogram.Record(std::numeric_limits<double>::quiet_NaN(),
opentelemetry::context::Context{}); // This is ignored too
histogram.Record(std::numeric_limits<double>::infinity(),
opentelemetry::context::Context{}); // This is ignored too

histogram.Record(10.10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
opentelemetry::context::Context{});
histogram.Record(10.10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
}

0 comments on commit 01eac4c

Please sign in to comment.