| 530 | : id(id_), workload(wl), contract(func, std::bind(&BaseTest::augmentTrace, this, ph::_1)) {} |
| 531 | |
| 532 | static Key makeKey() { |
| 533 | double ksrv = deterministicRandom()->random01(); |
| 534 | |
| 535 | // 25% of the time it's empty, 25% it's above range. |
| 536 | if (ksrv < 0.25) |
| 537 | return Key(); |
| 538 | |
| 539 | int64_t key_size; |
| 540 | if (ksrv < 0.5) |
| 541 | key_size = deterministicRandom()->randomInt64(1, CLIENT_KNOBS->KEY_SIZE_LIMIT + 1) + |
| 542 | CLIENT_KNOBS->KEY_SIZE_LIMIT; |
| 543 | else |
| 544 | key_size = deterministicRandom()->randomInt64(1, CLIENT_KNOBS->KEY_SIZE_LIMIT + 1); |
| 545 | |
| 546 | std::string skey; |
| 547 | skey.reserve(key_size); |
| 548 | for (size_t j = 0; j < key_size; ++j) |
| 549 | skey.append(1, (char)deterministicRandom()->randomInt(0, 256)); |
| 550 | |
| 551 | // 15% (= 20% * 75%) of the time generating keys after \xff\xff to test special keys code |
| 552 | if (deterministicRandom()->random01() < 0.2) |
| 553 | return Key(skey).withPrefix(specialKeys.begin); |
| 554 | else |
| 555 | return Key(skey); |
| 556 | } |
| 557 | |
| 558 | static Value makeValue() { |
| 559 | double vrv = deterministicRandom()->random01(); |
nothing calls this directly
no test coverage detected