(n int)
| 139 | } |
| 140 | |
| 141 | func genFiles(n int) []protocol.FileInfo { |
| 142 | files := make([]protocol.FileInfo, n) |
| 143 | t := time.Now().Unix() |
| 144 | for i := 0; i < n; i++ { |
| 145 | files[i] = protocol.FileInfo{ |
| 146 | Name: fmt.Sprintf("file%d", i), |
| 147 | ModifiedS: t, |
| 148 | Sequence: int64(i + 1), |
| 149 | Blocks: []protocol.BlockInfo{{Offset: 0, Size: 100, Hash: []byte("some hash bytes")}}, |
| 150 | Version: protocol.Vector{Counters: []protocol.Counter{{ID: 42, Value: 1}}}, |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | return files |
| 155 | } |
| 156 | |
| 157 | func BenchmarkIndex_10000(b *testing.B) { |
| 158 | benchmarkIndex(b, 10000) |
no test coverage detected