Skip to content

Commit

Permalink
Add benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
divan committed Apr 3, 2016
1 parent d8619ca commit a583e92
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions package_test.go
Expand Up @@ -21,3 +21,20 @@ func TestPackageChecks(t *testing.T) {
pkg, subpkg = "github.com/divan/package1", "github.com/divan/package2"
checkResult(pkg, subpkg, false)
}

func BenchmarkIsStdlibTrue(b *testing.B) {
for i := 0; i < b.N; i++ {
IsStdlib("fmt")
}
}
func BenchmarkIsStdlibFalse(b *testing.B) {
for i := 0; i < b.N; i++ {
IsStdlib("github.com/divan/package")
}
}

func BenchmarkIsInternal(b *testing.B) {
for i := 0; i < b.N; i++ {
IsInternal("github.com/divan/package1", "github.com/divan/package2")
}
}

0 comments on commit a583e92

Please sign in to comment.