filepathfilter: add benchmark for basic pattern
This commit is contained in:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user