X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fms_conn.c;h=755a2e5a8a5db672a747479d88e6b0f21e6bb2d7;hb=28adf7b936c6f5c25b7526ff56ec1256da1246d4;hp=f380a6672a32cedfc78b3957c89085051e8ed46b;hpb=2df9084da8c73d8813f8740e88cd70fe63dd742c;p=awesomized%2Flibmemcached diff --git a/clients/ms_conn.c b/clients/ms_conn.c index f380a667..755a2e5a 100644 --- a/clients/ms_conn.c +++ b/clients/ms_conn.c @@ -2465,9 +2465,7 @@ static bool ms_need_yield(ms_conn_t *c) { gettimeofday(&curr_time, NULL); time_diff= ms_time_diff(&ms_thread->startup_time, &curr_time); - tps= - (int64_t)((task->get_opt - + task->set_opt) / ((uint64_t)time_diff / 1000000)); + tps= (int64_t)(((task->get_opt + task->set_opt) / (uint64_t)time_diff) * 1000000); /* current throughput is greater than expected throughput */ if (tps > ms_thread->thread_ctx->tps_perconn)