(b *testing.B)
| 189 | } |
| 190 | |
| 191 | func BenchmarkChainParallelMixRW(b *testing.B) { |
| 192 | var r = setupBenchmarkChainRequest(b) |
| 193 | var c = setupBenchmarkChain(b) |
| 194 | b.RunParallel(func(pb *testing.PB) { |
| 195 | var ( |
| 196 | err error |
| 197 | counter int32 |
| 198 | ) |
| 199 | for pb.Next() { |
| 200 | if _, err = c.Query(r[allKeyPermKeygen.next()]); err != nil { |
| 201 | b.Fatalf("Failed to execute: %v", err) |
| 202 | } |
| 203 | if atomic.AddInt32(&counter, 1)%benchmarkQueriesPerBlock == 0 { |
| 204 | if err = c.state.commit(); err != nil { |
| 205 | b.Fatalf("failed to commit block: %v", err) |
| 206 | } |
| 207 | } |
| 208 | } |
| 209 | }) |
| 210 | teardownBenchmarkChain(b, c) |
| 211 | } |
| 212 | |
| 213 | func TestChain(t *testing.T) { |
| 214 | Convey("test xenomint chain", t, func() { |
nothing calls this directly
no test coverage detected