Merge in display fix for memaslap
authorBrian Aker <brian@tangent.org>
Tue, 14 Jun 2011 23:18:39 +0000 (16:18 -0700)
committerBrian Aker <brian@tangent.org>
Tue, 14 Jun 2011 23:18:39 +0000 (16:18 -0700)
clients/ms_conn.c

index f380a6672a32cedfc78b3957c89085051e8ed46b..755a2e5a8a5db672a747479d88e6b0f21e6bb2d7 100644 (file)
@@ -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)