added query cache
This commit is contained in:
parent
0e2b25e788
commit
a2e54b1f0e
2 changed files with 82 additions and 0 deletions
|
|
@ -275,6 +275,14 @@ func BenchmarkNewQueryComplexOr(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkNewQueryCacheComplexOr(b *testing.B) {
|
||||
c := NewQueryCache(1)
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.NewQuery(compOr)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkNewQuerySort(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
|
|
@ -303,6 +311,14 @@ func BenchmarkNewQuerySortComplexOr(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkNewQueryCacheSortComplexOr(b *testing.B) {
|
||||
c := NewQueryCache(1)
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.NewQuery(compOrSort)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkFilterSimple(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
q, err := NewQuery(simple)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue