DB* db; // Assumption DB is Open'ed already.
};
-static std::string RandomString(Random* rnd, int len) {
- std::string r;
- test::RandomString(rnd, len, &r);
- return r;
-}
-
static void DataPumpThreadBody(void* arg) {
DataPumpThread* t = reinterpret_cast<DataPumpThread*>(arg);
DB* db = t->db;
Random rnd(301);
size_t i = 0;
while (i++ < t->no_records) {
- if (!db->Put(WriteOptions(), Slice(RandomString(&rnd, 500)),
- Slice(RandomString(&rnd, 500)))
+ if (!db->Put(WriteOptions(), Slice(rnd.RandomString(500)),
+ Slice(rnd.RandomString(500)))
.ok()) {
fprintf(stderr, "Error in put\n");
exit(1);