sysbench-developers team mailing list archive
-
sysbench-developers team
-
Mailing list archive
-
Message #00097
[Merge] lp:~erwan-t/sysbench/sysbench into lp:sysbench
Erwan Velu has proposed merging lp:~erwan-t/sysbench/sysbench into lp:sysbench.
Requested reviews:
sysbench-developers (sysbench-developers)
For more details, see:
https://code.launchpad.net/~erwan-t/sysbench/sysbench/+merge/234668
This patch insure that no code that could consume CPU is between the LOG_EVENT_START and the working loop.
In the current code, a random calculation was done after the LOG_EVENT_START was setup. If for any reason this random thing is taking some time, then the complete result will be inaccurate.
--
https://code.launchpad.net/~erwan-t/sysbench/sysbench/+merge/234668
Your team sysbench-developers is requested to review the proposed merge of lp:~erwan-t/sysbench/sysbench into lp:sysbench.
=== modified file 'sysbench/tests/memory/sb_memory.c'
--- sysbench/tests/memory/sb_memory.c 2011-09-26 13:54:56 +0000
+++ sysbench/tests/memory/sb_memory.c 2014-09-15 11:18:34 +0000
@@ -261,11 +261,10 @@
buf = buffers[thread_id];
end = (int *)((char *)buf + memory_block_size);
- LOG_EVENT_START(msg, thread_id);
-
if (memory_access_rnd)
{
rand = sb_rnd();
+ LOG_EVENT_START(msg, thread_id);
switch (mem_req->type) {
case SB_MEM_OP_WRITE:
for (i = 0; i < memory_block_size; i++)
@@ -291,6 +290,7 @@
}
else
{
+ LOG_EVENT_START(msg, thread_id);
switch (mem_req->type) {
case SB_MEM_OP_NONE:
for (; buf < end; buf++)
Follow ups