@@ -45,7 +45,7 @@ TEST(HistogramToSum, Double)
4545 MeterProvider mp;
4646 auto m = mp.GetMeter (" meter1" , " version1" , " schema1" );
4747 std::string instrument_unit = " ms" ;
48- std::string instrument_name = " historgram1 " ;
48+ std::string instrument_name = " histogram1 " ;
4949 std::string instrument_desc = " histogram metrics" ;
5050
5151 std::unique_ptr<MockMetricExporter> exporter (new MockMetricExporter ());
@@ -97,7 +97,7 @@ TEST(HistogramToSumFilterAttributes, Double)
9797 MeterProvider mp;
9898 auto m = mp.GetMeter (" meter1" , " version1" , " schema1" );
9999 std::string instrument_unit = " ms" ;
100- std::string instrument_name = " historgram1 " ;
100+ std::string instrument_name = " histogram1 " ;
101101 std::string instrument_desc = " histogram metrics" ;
102102
103103 std::unordered_map<std::string, bool > allowedattr;
@@ -150,7 +150,7 @@ TEST(HistogramToSumFilterAttributesWithCardinaityLimit, Double)
150150 MeterProvider mp;
151151 auto m = mp.GetMeter (" meter1" , " version1" , " schema1" );
152152 std::string instrument_unit = " ms" ;
153- std::string instrument_name = " historgram1 " ;
153+ std::string instrument_name = " histogram1 " ;
154154 std::string instrument_desc = " histogram metrics" ;
155155 size_t cardinality_limit = 10000 ;
156156
@@ -375,9 +375,10 @@ TEST(CounterToSumFilterAttributesWithCardinalityLimit, Double)
375375 {
376376 for (const MetricData &md : smd.metric_data_ )
377377 {
378- // Something weird about attributes hashmap. If cardinality is setup to n, it emits n-1
379- // including overflow. Just making the logic generic here to succeed for n or n-1 total
380- // cardinality.
378+ // When the number of unique attribute sets exceeds the cardinality limit, the implementation
379+ // emits up to (cardinality_limit - 1) unique sets and one overflow set, resulting in a total
380+ // of cardinality_limit sets. This test checks that the number of emitted attribute sets is
381+ // within the expected range, accounting for the overflow behavior.
381382 EXPECT_GE (cardinality_limit, md.point_data_attr_ .size ());
382383 EXPECT_LT (cardinality_limit / 2 , md.point_data_attr_ .size ());
383384 for (size_t i = 0 ; i < md.point_data_attr_ .size (); i++)
0 commit comments