]> Cypherpunks repositories - gostls13.git/commitdiff
index/suffixarray: reduce size of a benchmark
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 25 Jun 2014 03:37:28 +0000 (20:37 -0700)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 25 Jun 2014 03:37:28 +0000 (20:37 -0700)
A single iteration of BenchmarkSaveRestore runs for 5 seconds
on my freebsd machine. 5 seconds looks like too long for a single
iteration.
This is the only benchmark that times out on freebsd-amd64-race builder.

R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/107340044

src/pkg/index/suffixarray/suffixarray_test.go

index df3e449d322e4bd2e29d78d6a3d355028e330113..644f00c75771c6eb3d21ff9aa5c9b3009a28f845 100644 (file)
@@ -287,7 +287,7 @@ func BenchmarkNewIndexRepeat(b *testing.B) {
 func BenchmarkSaveRestore(b *testing.B) {
        b.StopTimer()
        r := rand.New(rand.NewSource(0x5a77a1)) // guarantee always same sequence
-       data := make([]byte, 10<<20)            // 10MB of data to index
+       data := make([]byte, 1<<20)             // 1MB of data to index
        for i := range data {
                data[i] = byte(r.Intn(256))
        }