From: Brian Aker Date: Tue, 14 Jun 2011 23:18:39 +0000 (-0700) Subject: Merge in display fix for memaslap X-Git-Tag: 0.51~4^2~10 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=723bc354ac52038b4272677e2b621f6dfba4e55e;p=awesomized%2Flibmemcached Merge in display fix for memaslap --- 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)