Skip to content
Snippets Groups Projects
Commit 5df411f3 authored by Thomas Lopatic's avatar Thomas Lopatic
Browse files

Execute correct number of operations, even if not a multiple of thread count.

parent 7195b6c9
No related branches found
No related tags found
No related merge requests found
...@@ -743,7 +743,15 @@ public class Client ...@@ -743,7 +743,15 @@ public class Client
} }
Thread t=new ClientThread(db,dotransactions,workload,threadid,threadcount,props,opcount/threadcount, targetperthreadperms); int threadopcount = opcount/threadcount;
// ensure correct number of operations, in case opcount is not a multiple of threadcount
if (threadid<opcount%threadcount)
{
++threadopcount;
}
Thread t=new ClientThread(db,dotransactions,workload,threadid,threadcount,props,threadopcount, targetperthreadperms);
threads.add(t); threads.add(t);
//t.start(); //t.start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment