Skip to content

Commit

Permalink
[chore] add unit test for histogram in mdatagen (#10089)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed May 6, 2024
1 parent 4303692 commit 7855bf2
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 7855bf2

Please sign in to comment.