| 32 | } |
| 33 | |
| 34 | static std::string RandomKey(Random* rnd) { |
| 35 | int len = |
| 36 | (rnd->OneIn(3) ? 1 // Short sometimes to encourage collisions |
| 37 | : (rnd->OneIn(100) ? rnd->Skewed(10) : rnd->Uniform(10))); |
| 38 | return test::RandomKey(rnd, len); |
| 39 | } |
| 40 | |
| 41 | namespace { |
| 42 | class AtomicCounter { |