scanner: add scanoptions struct

This commit is contained in:
sentriz
2020-05-01 02:12:17 +01:00
parent 08e775c9dd
commit 24212af42e
5 changed files with 24 additions and 32 deletions

View File

@@ -40,17 +40,17 @@ func resetTablesPause(db *db.DB, b *testing.B) {
func BenchmarkScanFresh(b *testing.B) {
for n := 0; n < b.N; n++ {
resetTablesPause(testScanner.db, b)
testScanner.StartInc()
testScanner.Start(ScanOptions{})
}
}
func BenchmarkScanIncremental(b *testing.B) {
// do a full scan and reset
testScanner.StartInc()
testScanner.Start(ScanOptions{})
b.ResetTimer()
// do the inc scans
for n := 0; n < b.N; n++ {
testScanner.StartInc()
testScanner.Start(ScanOptions{})
}
}