Skip to content

Commit

Permalink
Add benchmark for MIB loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Rebhan committed Dec 2, 2021
1 parent f90749c commit 336b0ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/inputs/snmp/snmp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1295,3 +1295,12 @@ func TestTableJoinNoIndexAsTag_walk(t *testing.T) {
require.Contains(t, tb.Rows, rtr2)
require.Contains(t, tb.Rows, rtr3)
}

func BenchmarkMibLoading(b *testing.B) {
log := testutil.Logger{}
path := []string{"testdata"}
for i := 0; i < b.N; i++ {
err := snmp.LoadMibsFromPath(path, log)
require.NoError(b, err)
}
}

0 comments on commit 336b0ce

Please sign in to comment.