Merge pull request #35 from Percona-Lab/0.5

Fix for parallel_prepare
This commit is contained in:
Alexey Kopytov
2016-04-14 14:46:34 +04:00
2 changed files with 9 additions and 8 deletions

View File

@ -606,15 +606,16 @@ static void *eventgen_thread_proc(void *arg)
next_ns = next_ns + intr_ns*1000;
if (next_ns > curr_ns)
{
pause_ns = next_ns - curr_ns;
usleep(pause_ns / 1000);
}
else
{
pause_ns = 1000;
log_timestamp(LOG_DEBUG, &sb_globals.exec_timer,
"Event generation thread is too slow");
}
usleep(pause_ns / 1000);
queue_array[i].event_time = sb_timer_value(&sb_globals.exec_timer);
pthread_mutex_lock(&event_queue_mutex);

View File

@ -1,12 +1,16 @@
-- for proper initialization use --max-requests = N, where N is --num-threads
--
pathtest = string.match(test, "(.*/)") or ""
dofile(pathtest .. "common.lua")
function thread_init(thread_id)
set_vars()
end
function event(thread_id)
local index_name
local i
set_vars()
print("thread prepare"..thread_id)
if (oltp_secondary) then
@ -20,7 +24,3 @@ function thread_init(thread_id)
end
end
function event(thread_id)
end