Skip to content

Commit

Permalink
More format
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Mar 26, 2024
1 parent 5f132c5 commit a2f6e9e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const std::string kAttributesLimitOverflowKey = "otel.metrics.overflow";
const bool kAttributesLimitOverflowValue = true;
const size_t kOverflowAttributesHash = opentelemetry::sdk::common::GetHashForAttributeMap(
{{kAttributesLimitOverflowKey,
kAttributesLimitOverflowValue}}); // precalculated for optimization
kAttributesLimitOverflowValue}}); // precalculated for optimization

class AttributeHashGenerator
{
Expand Down
7 changes: 3 additions & 4 deletions sdk/test/metrics/exemplar/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

foreach(
testname
no_exemplar_reservoir_test
aligned_histogram_bucket_exemplar_reservoir_test reservoir_cell_test
foreach(testname
no_exemplar_reservoir_test
aligned_histogram_bucket_exemplar_reservoir_test reservoir_cell_test
)
add_executable(${testname} "${testname}.cc")
target_link_libraries(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ TEST_F(HistogramExemplarReservoirTestPeer, OfferMeasurement)
{
std::vector<double> boundaries{1, 5.0, 10, 15, 20};
auto histogram_exemplar_reservoir = ExemplarReservoir::GetAlignedHistogramBucketExemplarReservoir(
boundaries.size(), AlignedHistogramBucketExemplarReservoir::GetHistogramCellSelector(boundaries), nullptr);
boundaries.size(),
AlignedHistogramBucketExemplarReservoir::GetHistogramCellSelector(boundaries), nullptr);
histogram_exemplar_reservoir->OfferMeasurement(
1.0, MetricAttributes{}, opentelemetry::context::Context{}, std::chrono::system_clock::now());
histogram_exemplar_reservoir->OfferMeasurement(static_cast<int64_t>(1), MetricAttributes{},
Expand Down
4 changes: 2 additions & 2 deletions sdk/test/metrics/sync_metric_storage_counter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_P(WritableMetricStorageTestFixture, LongCounterSumAggregation)
int64_t expected_total_get_requests = 0;
int64_t expected_total_put_requests = 0;
InstrumentDescriptor instr_desc = {"name", "desc", "1unit", InstrumentType::kCounter,
InstrumentValueType::kLong};
InstrumentValueType::kLong};
std::map<std::string, std::string> attributes_get = {{"RequestType", "GET"}};
std::map<std::string, std::string> attributes_put = {{"RequestType", "PUT"}};

Expand Down Expand Up @@ -174,7 +174,7 @@ TEST_P(WritableMetricStorageTestFixture, DoubleCounterSumAggregation)
double expected_total_get_requests = 0;
double expected_total_put_requests = 0;
InstrumentDescriptor instr_desc = {"name", "desc", "1unit", InstrumentType::kCounter,
InstrumentValueType::kDouble};
InstrumentValueType::kDouble};
std::map<std::string, std::string> attributes_get = {{"RequestType", "GET"}};
std::map<std::string, std::string> attributes_put = {{"RequestType", "PUT"}};

Expand Down
4 changes: 2 additions & 2 deletions sdk/test/metrics/sync_metric_storage_histogram_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST_P(WritableMetricStorageHistogramTestFixture, LongHistogram)
int64_t expected_total_get_requests = 0;
int64_t expected_total_put_requests = 0;
InstrumentDescriptor instr_desc = {"name", "desc", "1unit", InstrumentType::kHistogram,
InstrumentValueType::kLong};
InstrumentValueType::kLong};
std::map<std::string, std::string> attributes_get = {{"RequestType", "GET"}};
std::map<std::string, std::string> attributes_put = {{"RequestType", "PUT"}};

Expand Down Expand Up @@ -176,7 +176,7 @@ TEST_P(WritableMetricStorageHistogramTestFixture, DoubleHistogram)
double expected_total_get_requests = 0;
double expected_total_put_requests = 0;
InstrumentDescriptor instr_desc = {"name", "desc", "1unit", InstrumentType::kHistogram,
InstrumentValueType::kDouble};
InstrumentValueType::kDouble};
std::map<std::string, std::string> attributes_get = {{"RequestType", "GET"}};
std::map<std::string, std::string> attributes_put = {{"RequestType", "PUT"}};

Expand Down

0 comments on commit a2f6e9e

Please sign in to comment.