Compare commits
13 Commits
3668203dc0
...
a7fd68d648
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | a7fd68d648 | |
Vitaliy Filippov | be3f775d51 | |
Vitaliy Filippov | f33fe48674 | |
Vitaliy Filippov | 6f09077633 | |
Vitaliy Filippov | 9e4d218015 | |
Vitaliy Filippov | 6c3d45efc6 | |
Vitaliy Filippov | 1909eb8eea | |
Vitaliy Filippov | af682fd5f3 | |
Vitaliy Filippov | 2f22cc6c5f | |
Vitaliy Filippov | 34a28349f3 | |
Vitaliy Filippov | b46654cb94 | |
Vitaliy Filippov | 5caaf9ff62 | |
Vitaliy Filippov | d8f58aa009 |
|
@ -197,7 +197,6 @@ struct kv_op_t
|
|||
|
||||
void exec();
|
||||
void next(); // for list
|
||||
~kv_op_t();
|
||||
protected:
|
||||
int recheck_policy = KV_RECHECK_LEAF;
|
||||
bool started = false;
|
||||
|
@ -986,24 +985,14 @@ void kv_op_t::exec()
|
|||
finish(-ENOSYS);
|
||||
}
|
||||
|
||||
kv_op_t::~kv_op_t()
|
||||
{
|
||||
if (started && !done)
|
||||
{
|
||||
done = true;
|
||||
db->active_ops--;
|
||||
}
|
||||
}
|
||||
|
||||
void kv_op_t::finish(int res)
|
||||
{
|
||||
auto db = this->db;
|
||||
this->res = res;
|
||||
this->done = true;
|
||||
db->active_ops--;
|
||||
(std::function<void(kv_op_t *)>(callback))(this);
|
||||
if (!db->active_ops && db->closing)
|
||||
db->close(db->on_close);
|
||||
(std::function<void(kv_op_t *)>(callback))(this);
|
||||
}
|
||||
|
||||
void kv_op_t::get()
|
||||
|
|
|
@ -147,8 +147,6 @@ json11::Json::object kv_test_t::parse_args(int narg, const char *args[])
|
|||
" Fraction of key delete operations\n"
|
||||
" --list_prob 300\n"
|
||||
" Fraction of listing operations\n"
|
||||
" --reopen_prob 1\n"
|
||||
" Fraction of database reopens\n"
|
||||
" --min_key_len 10\n"
|
||||
" Minimum key size in bytes\n"
|
||||
" --max_key_len 70\n"
|
||||
|
@ -609,8 +607,10 @@ void kv_test_t::add_stat(kv_test_lat_t & stat, timespec tv_begin)
|
|||
int64_t usec = (tv_end.tv_sec - tv_begin.tv_sec)*1000000 +
|
||||
(tv_end.tv_nsec - tv_begin.tv_nsec)/1000;
|
||||
if (usec > 0)
|
||||
{
|
||||
stat.usec += usec;
|
||||
stat.count++;
|
||||
stat.count++;
|
||||
}
|
||||
}
|
||||
|
||||
void kv_test_t::print_stats(kv_test_stat_t & prev_stat, timespec & prev_stat_time)
|
||||
|
|
Loading…
Reference in New Issue