Skip to content

Commit

Permalink
add benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Bertschy <[email protected]>
  • Loading branch information
matthyx committed Nov 16, 2023
1 parent ea914f8 commit 1319e6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions armometadata/k8sutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,11 @@ func TestExtractMetadataFromJsonBytes(t *testing.T) {
})
}
}

func BenchmarkExtractMetadataFromJsonBytes(b *testing.B) {
input, err := os.ReadFile("testdata/applicationactivity.json")
assert.NoError(b, err)
for i := 0; i < b.N; i++ {
_, _, _, _, _, _ = ExtractMetadataFromJsonBytes(input)
}
}

0 comments on commit 1319e6c

Please sign in to comment.