|
@ -12,7 +12,7 @@ constexpr int data_size = 128 << 20; |
|
|
Status OpenDB(std::string dbName, DB **db) { |
|
|
Status OpenDB(std::string dbName, DB **db) { |
|
|
std::string rm_command = "rm -rf " + dbName; |
|
|
std::string rm_command = "rm -rf " + dbName; |
|
|
system(rm_command.c_str()); |
|
|
system(rm_command.c_str()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Options options; |
|
|
Options options; |
|
|
options.create_if_missing = true; |
|
|
options.create_if_missing = true; |
|
|
return DB::Open(options, dbName, db); |
|
|
return DB::Open(options, dbName, db); |
|
@ -37,7 +37,7 @@ void InsertData(DB *db, uint64_t ttl/* second */) { |
|
|
// std::string value = "aaaaaa_ts_5678aaaaaa";
|
|
|
// std::string value = "aaaaaa_ts_5678aaaaaa";
|
|
|
// db->Put(writeOptions, key, value);
|
|
|
// db->Put(writeOptions, key, value);
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|