title: wrk executing Lua script
body: <p>My question is that when I run </p>
  
  <pre><code>wrk -d10s -t20 -c20 -s /mnt/c/xxxx/post.lua http://localhost:xxxx/post
  </code></pre>
  
  <p>the Lua script that is only executed once? It will only put one item into the database at the URL.</p>
  
  <pre><code>-- example HTTP POST script which demonstrates setting the
  -- HTTP method, body, and adding a header
  math.randomseed(os.time())
  number =  math.random()
  wrk.method = "POST"
  wrk.headers["Content-Type"] = "application/json"        
  wrk.body = '{"name": "' .. tostring(number) .. '", "title":"test","enabled":true,"defaultValue":false}'
  </code></pre>
  
  <p>Is there a way to make it create the 'number' variable dynamically and keep adding new items into the database until the 'wrk' command has finished its test? Or that it will keep executing the script for the duration of the test creating and inserting new 'number' variables into 'wrk.body' ?</p>
  
  <p>Apologies I have literally only being looking at Lua for a few hours.</p>
  
  <p>Thanks</p>