Skip to content

Commit

Permalink
[chore] add unit test for histogram in mdatagen (open-telemetry#10089)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored and andrzej-stencel committed May 27, 2024
1 parent b497ace commit e599780
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/mdatagen/metricdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ func (d histogram) Type() string {
}

func (d histogram) HasMonotonic() bool {
return true
return false
}

func (d histogram) HasAggregated() bool {
return true
return false
}

func (d histogram) Instrument() string {
Expand Down
1 change: 1 addition & 0 deletions cmd/mdatagen/metricdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func TestMetricData(t *testing.T) {
}{
{&gauge{}, "Gauge", false, false},
{&sum{}, "Sum", true, true},
{&histogram{}, "Histogram", false, false},
} {
assert.Equal(t, arg.typ, arg.metricData.Type())
assert.Equal(t, arg.hasAggregated, arg.metricData.HasAggregated())
Expand Down

0 comments on commit e599780

Please sign in to comment.