@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user