mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 22:23:07 -03:00
added benchmarks and scripts to run, parse and plot them
moved benchmark/run-slow-benchmarks.sh's content to Makefile
This commit is contained in:
@ -3,7 +3,6 @@ package enry
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@ -80,20 +79,3 @@ func (s *EnryTestSuite) TestIsBinary() {
|
||||
assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected))
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
htmlPath = "some/random/dir/file.html"
|
||||
jsPath = "some/random/dir/file.js"
|
||||
)
|
||||
|
||||
func BenchmarkVendor(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = IsVendor(htmlPath)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkVendorJS(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = IsVendor(jsPath)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user