filepathfilter: add benchmark for basic pattern

This commit is contained in:
risk danger olson 2017-05-18 06:35:51 -06:00
parent 5353e42ef8
commit 1b825ce99e

@ -10,6 +10,16 @@ import (
"github.com/git-lfs/git-lfs/tools"
)
func BenchmarkFilterNoWildcard(b *testing.B) {
files := benchmarkTree(b)
filter := filepathfilter.New([]string{"lfs"}, nil)
for i := 0; i < b.N; i++ {
for _, f := range files {
filter.Allows(f)
}
}
}
func BenchmarkFilterIncludeWildcardOnly(b *testing.B) {
files := benchmarkTree(b)
filter := filepathfilter.New([]string{"*.go"}, nil)