From 088953fbb64e8d776ff85719ceb4f1c2a008f8c9 Mon Sep 17 00:00:00 2001 From: Steve Yen Date: Thu, 16 Mar 2017 13:46:19 -0700 Subject: [PATCH] more collector benchmarks with larger sizes --- search/collector/topn_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/search/collector/topn_test.go b/search/collector/topn_test.go index 85a008b7..bb1f051c 100644 --- a/search/collector/topn_test.go +++ b/search/collector/topn_test.go @@ -480,6 +480,18 @@ func BenchmarkTop100of10000Scores(b *testing.B) { }, b) } +func BenchmarkTop1000of10000Scores(b *testing.B) { + benchHelper(10000, func() search.Collector { + return NewTopNCollector(1000, 0, search.SortOrder{&search.SortScore{Desc: true}}) + }, b) +} + +func BenchmarkTop10000of100000Scores(b *testing.B) { + benchHelper(100000, func() search.Collector { + return NewTopNCollector(10000, 0, search.SortOrder{&search.SortScore{Desc: true}}) + }, b) +} + func BenchmarkTop10of100000Scores(b *testing.B) { benchHelper(100000, func() search.Collector { return NewTopNCollector(10, 0, search.SortOrder{&search.SortScore{Desc: true}}) @@ -491,3 +503,15 @@ func BenchmarkTop100of100000Scores(b *testing.B) { return NewTopNCollector(100, 0, search.SortOrder{&search.SortScore{Desc: true}}) }, b) } + +func BenchmarkTop1000of100000Scores(b *testing.B) { + benchHelper(100000, func() search.Collector { + return NewTopNCollector(1000, 0, search.SortOrder{&search.SortScore{Desc: true}}) + }, b) +} + +func BenchmarkTop10000of1000000Scores(b *testing.B) { + benchHelper(1000000, func() search.Collector { + return NewTopNCollector(10000, 0, search.SortOrder{&search.SortScore{Desc: true}}) + }, b) +}