提交 95769d9d authored 作者: andrei's avatar andrei

minor changes in test

上级 70ba94a0
...@@ -102,7 +102,7 @@ public class TestMvccMultiThreaded2 extends TestBase { ...@@ -102,7 +102,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
} }
if (DISPLAY_STATS) { if (DISPLAY_STATS) {
System.out.println(String.format( println(String.format(
"+ INFO: TestMvccMultiThreaded2 RUN STATS threads=%d, minProcessed=%d, maxProcessed=%d, " "+ INFO: TestMvccMultiThreaded2 RUN STATS threads=%d, minProcessed=%d, maxProcessed=%d, "
+ "totalProcessed=%d, averagePerThread=%d, averagePerThreadPerSecond=%d\n", + "totalProcessed=%d, averagePerThread=%d, averagePerThreadPerSecond=%d\n",
TEST_THREAD_COUNT, minProcessed, maxProcessed, totalProcessed, totalProcessed / TEST_THREAD_COUNT, TEST_THREAD_COUNT, minProcessed, maxProcessed, totalProcessed, totalProcessed / TEST_THREAD_COUNT,
...@@ -139,10 +139,10 @@ public class TestMvccMultiThreaded2 extends TestBase { ...@@ -139,10 +139,10 @@ public class TestMvccMultiThreaded2 extends TestBase {
// give the other threads a chance to start up before going into our work loop // give the other threads a chance to start up before going into our work loop
Thread.yield(); Thread.yield();
while (!done) {
try {
PreparedStatement ps = conn.prepareStatement( PreparedStatement ps = conn.prepareStatement(
"SELECT * FROM test WHERE entity_id = ? FOR UPDATE"); "SELECT * FROM test WHERE entity_id = ? FOR UPDATE");
while (!done) {
try {
String id; String id;
int value; int value;
if ((iterationsProcessed & 1) == 0) { if ((iterationsProcessed & 1) == 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论