File: parallel_prepare.lua

package info (click to toggle)
sysbench 1.0.20%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,840 kB
  • sloc: ansic: 11,830; sh: 1,752; xml: 736; makefile: 195
file content (30 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- for proper initialization use --max-requests = N, where N is --num-threads
--
pathtest = string.match(test, "(.*/)")

if pathtest then
   dofile(pathtest .. "common.lua")
else
   require("common")
end

function thread_init()
   set_vars()
end

function event()
   local index_name
   local i
   print("thread prepare"..thread_id)

   if (oltp_secondary) then
     index_name = "KEY xid"
   else
     index_name = "PRIMARY KEY"
   end

   for i=thread_id+1, oltp_tables_count, num_threads  do
   create_insert(i)
   end

end