(r *http.Request, key, value string, iterations int, wait, done chan struct{})
| 92 | } |
| 93 | |
| 94 | func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) { |
| 95 | <-wait |
| 96 | for i := 0; i < iterations; i++ { |
| 97 | Set(r, key, value) |
| 98 | } |
| 99 | done <- struct{}{} |
| 100 | |
| 101 | } |
| 102 | |
| 103 | func benchmarkMutex(b *testing.B, numReaders, numWriters, iterations int) { |
| 104 |