Skip to content

Commit

Permalink
elf: add simple benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
lmb committed Feb 10, 2022
1 parent 7816b93 commit 16db4a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions elf_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ func TestLoadCollectionSpec(t *testing.T) {
})
}

func BenchmarkELFLoader(b *testing.B) {
b.ReportAllocs()

for i := 0; i < b.N; i++ {
LoadCollectionSpec("testdata/loader-el.elf")
}
}

func TestDataSections(t *testing.T) {
file := fmt.Sprintf("testdata/loader-%s.elf", internal.ClangEndian)
coll, err := LoadCollectionSpec(file)
Expand Down

0 comments on commit 16db4a4

Please sign in to comment.