Commit 9249b983 authored by Yuqi Zhang's avatar Yuqi Zhang
Browse files

print cmp exp setting, fix missing lock crash

parent 9e5b9a57
......@@ -82,7 +82,8 @@ public:
static inline void print_settings()
{
cout << "exp subject: [" << alg_type << "-" << rdt_type << "]\n";
cout << "exp subject: [" << alg_type << "-" << rdt_type << "]"
<< (exp_setting::compare ? ", cmp" : "") << "\n";
cout << "exp on ";
if (type != exp_type::pattern)
{
......
......@@ -140,6 +140,7 @@ string list_log::random_get()
string list_log::random_get_removed()
{
lock_guard<mutex> lk(mtx);
if (ele_removed.empty()) return {};
int pos = intRand(ele_removed.size()); // NOLINT
auto random_it = next(begin(ele_removed), pos);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment