ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [34/41] incubator-ignite git commit: # ignite-32 Fix prepare store benchmark.
Date Fri, 06 Feb 2015 12:17:00 GMT
# ignite-32 Fix prepare store benchmark.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/92ae28d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/92ae28d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/92ae28d4

Branch: refs/heads/ignite-164v2
Commit: 92ae28d4650812520d970c5e6fe6c94918eaef4c
Parents: 6d6fd8c
Author: anovikov <anovikov@gridgain.com>
Authored: Fri Feb 6 17:25:55 2015 +0700
Committer: anovikov <anovikov@gridgain.com>
Committed: Fri Feb 6 17:25:55 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/IgniteJdbcStoreAbstractBenchmark.java      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/92ae28d4/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/store/jdbc/IgniteJdbcStoreAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/store/jdbc/IgniteJdbcStoreAbstractBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/store/jdbc/IgniteJdbcStoreAbstractBenchmark.java
index a521afb..0d5fe76 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/store/jdbc/IgniteJdbcStoreAbstractBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/store/jdbc/IgniteJdbcStoreAbstractBenchmark.java
@@ -82,14 +82,20 @@ public abstract class IgniteJdbcStoreAbstractBenchmark extends IgniteAbstractBen
 
             PreparedStatement orgStmt = conn.prepareStatement("INSERT INTO SAMPLE(id, value)
VALUES (?, ?)");
 
-            for (int i = 0; i < fillRange(); i++) {
+            int i;
+
+            for (i = 1; i <= fillRange(); i++) {
                 orgStmt.setInt(1, i);
                 orgStmt.setInt(2, i);
 
                 orgStmt.addBatch();
+
+                if (i % 1000 == 0)
+                    orgStmt.executeBatch();
             }
 
-            orgStmt.executeBatch();
+            if (i % 1000 != 0)
+                orgStmt.executeBatch();
 
             conn.commit();
 


Mime
View raw message