Skip to content

Commit

Permalink
add benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump committed Apr 19, 2024
1 parent 5f41089 commit 2846adc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions linker/symbols_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package linker

import (
"testing"

"github.com/stretchr/testify/require"
)

func BenchmarkSymbols(b *testing.B) {
s := &Symbols{}
_, err := s.importPackages(nil, "foo.bar.baz.fizz.buzz.frob.nitz", nil)
require.NoError(b, err)
for i := 0; i < b.N; i++ {
pkg := s.getPackage("foo.bar.baz.fizz.buzz.frob.nitz", true)
require.NotNil(b, pkg)
}
}

0 comments on commit 2846adc

Please sign in to comment.