@@ -120,7 +120,7 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) {
120120 intervalStartTimeMs int64
121121 }{
122122 {
123- name : "histogram with startTimestamp" ,
123+ name : "histogram with no startTimestamp" ,
124124 metricName : "histogram" ,
125125 intervalStartTimeMs : 11 ,
126126 labels : labels .FromMap (map [string ]string {"a" : "A" , "b" : "B" }),
@@ -138,7 +138,6 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) {
138138 point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
139139 point .ExplicitBounds ().FromRaw ([]float64 {0.75 , 2.75 })
140140 point .BucketCounts ().FromRaw ([]uint64 {33 , 22 , 11 })
141- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
142141 attributes := point .Attributes ()
143142 attributes .PutStr ("a" , "A" )
144143 attributes .PutStr ("b" , "B" )
@@ -207,7 +206,6 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) {
207206 point .SetFlags (pmetric .DefaultDataPointFlags .WithNoRecordedValue (true ))
208207 point .ExplicitBounds ().FromRaw ([]float64 {0.75 , 2.75 })
209208 point .BucketCounts ().FromRaw ([]uint64 {0 , 0 , 0 })
210- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
211209 attributes := point .Attributes ()
212210 attributes .PutStr ("a" , "A" )
213211 attributes .PutStr ("b" , "B" )
@@ -239,8 +237,7 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) {
239237 point := pmetric .NewHistogramDataPoint ()
240238 point .SetCount (66 )
241239 point .SetSum (1004.78 )
242- point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
243- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
240+ point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
244241 point .BucketCounts ().FromRaw ([]uint64 {66 })
245242 attributes := point .Attributes ()
246243 attributes .PutStr ("a" , "A" )
@@ -323,7 +320,6 @@ func TestMetricGroupData_toNHCBDistributionUnitTest(t *testing.T) {
323320 point .SetCount (180 )
324321 point .SetSum (100.5 )
325322 point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond ))
326- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond ))
327323 point .ExplicitBounds ().FromRaw ([]float64 {1.0 , 2.0 , 5.0 , 10.0 })
328324 point .BucketCounts ().FromRaw ([]uint64 {10 , 25 , 45 , 50 , 50 })
329325 attributes := point .Attributes ()
@@ -347,7 +343,6 @@ func TestMetricGroupData_toNHCBDistributionUnitTest(t *testing.T) {
347343 point := pmetric .NewHistogramDataPoint ()
348344 point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond ))
349345 point .SetFlags (pmetric .DefaultDataPointFlags .WithNoRecordedValue (true ))
350- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond ))
351346 point .ExplicitBounds ().FromRaw ([]float64 {1.0 , 2.0 , 5.0 , 10.0 })
352347 point .BucketCounts ().FromRaw ([]uint64 {0 , 0 , 0 , 0 , 0 })
353348 attributes := point .Attributes ()
@@ -374,7 +369,6 @@ func TestMetricGroupData_toNHCBDistributionUnitTest(t *testing.T) {
374369 point .SetCount (50 )
375370 point .SetSum (125.25 )
376371 point .SetTimestamp (pcommon .Timestamp (12 * time .Millisecond ))
377- point .SetStartTimestamp (pcommon .Timestamp (12 * time .Millisecond ))
378372 point .ExplicitBounds ().FromRaw ([]float64 {0.5 , 2.0 })
379373 point .BucketCounts ().FromRaw ([]uint64 {15 , 20 , 15 })
380374 attributes := point .Attributes ()
@@ -400,7 +394,6 @@ func TestMetricGroupData_toNHCBDistributionUnitTest(t *testing.T) {
400394 point .SetCount (16 )
401395 point .SetSum (10.0 )
402396 point .SetTimestamp (pcommon .Timestamp (30 * time .Millisecond ))
403- point .SetStartTimestamp (pcommon .Timestamp (30 * time .Millisecond ))
404397 point .ExplicitBounds ().FromRaw ([]float64 {- 5.0 , 0.0 , 5.0 })
405398 point .BucketCounts ().FromRaw ([]uint64 {5 , 10 , 15 , 16 })
406399 point .Attributes ().PutStr ("a" , "A" )
@@ -455,7 +448,7 @@ func TestMetricGroupData_toExponentialDistributionUnitTest(t *testing.T) {
455448 intervalStartTimeMs int64
456449 }{
457450 {
458- name : "integer histogram with startTimestamp" ,
451+ name : "integer histogram without startTimestamp" ,
459452 metricName : "request_duration_seconds" ,
460453 intervalStartTimeMs : 11 ,
461454 labels : labels .FromMap (map [string ]string {"a" : "A" , "b" : "B" }),
@@ -481,8 +474,7 @@ func TestMetricGroupData_toExponentialDistributionUnitTest(t *testing.T) {
481474 point := pmetric .NewExponentialHistogramDataPoint ()
482475 point .SetCount (66 )
483476 point .SetSum (1004.78 )
484- point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
485- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
477+ point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
486478 point .SetScale (1 )
487479 point .SetZeroThreshold (0.42 )
488480 point .SetZeroCount (1 )
@@ -560,7 +552,6 @@ func TestMetricGroupData_toExponentialDistributionUnitTest(t *testing.T) {
560552 point := pmetric .NewExponentialHistogramDataPoint ()
561553 point .SetTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
562554 point .SetFlags (pmetric .DefaultDataPointFlags .WithNoRecordedValue (true ))
563- point .SetStartTimestamp (pcommon .Timestamp (11 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
564555 attributes := point .Attributes ()
565556 attributes .PutStr ("a" , "A" )
566557 attributes .PutStr ("b" , "B" )
@@ -704,8 +695,7 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) {
704695 qn99 := qtL .AppendEmpty ()
705696 qn99 .SetQuantile (.99 )
706697 qn99 .SetValue (82 )
707- point .SetTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
708- point .SetStartTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds
698+ point .SetTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
709699 attributes := point .Attributes ()
710700 attributes .PutStr ("a" , "A" )
711701 attributes .PutStr ("b" , "B" )
@@ -848,8 +838,7 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) {
848838 qn99 := qtL .AppendEmpty ()
849839 qn99 .SetQuantile (.99 )
850840 qn99 .SetValue (0 )
851- point .SetTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
852- point .SetStartTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds
841+ point .SetTimestamp (pcommon .Timestamp (14 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
853842 attributes := point .Attributes ()
854843 attributes .PutStr ("a" , "A" )
855844 attributes .PutStr ("b" , "B" )
@@ -942,7 +931,6 @@ func TestMetricGroupData_toNumberDataUnitTest(t *testing.T) {
942931
943932 // the time in milliseconds -> nanoseconds.
944933 point .SetTimestamp (pcommon .Timestamp (13 * time .Millisecond ))
945- point .SetStartTimestamp (pcommon .Timestamp (13 * time .Millisecond ))
946934
947935 attributes := point .Attributes ()
948936 attributes .PutStr ("a" , "A" )
@@ -984,8 +972,7 @@ func TestMetricGroupData_toNumberDataUnitTest(t *testing.T) {
984972 want : func () pmetric.NumberDataPoint {
985973 point := pmetric .NewNumberDataPoint ()
986974 point .SetDoubleValue (33.7 )
987- point .SetTimestamp (pcommon .Timestamp (13 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
988- point .SetStartTimestamp (pcommon .Timestamp (13 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
975+ point .SetTimestamp (pcommon .Timestamp (13 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
989976 attributes := point .Attributes ()
990977 attributes .PutStr ("a" , "A" )
991978 attributes .PutStr ("b" , "B" )
@@ -1003,8 +990,7 @@ func TestMetricGroupData_toNumberDataUnitTest(t *testing.T) {
1003990 want : func () pmetric.NumberDataPoint {
1004991 point := pmetric .NewNumberDataPoint ()
1005992 point .SetDoubleValue (99.9 )
1006- point .SetTimestamp (pcommon .Timestamp (28 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
1007- point .SetStartTimestamp (pcommon .Timestamp (28 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
993+ point .SetTimestamp (pcommon .Timestamp (28 * time .Millisecond )) // the time in milliseconds -> nanoseconds.
1008994 attributes := point .Attributes ()
1009995 attributes .PutStr ("a" , "A" )
1010996 attributes .PutStr ("b" , "B" )
0 commit comments