liuruiyiyang commented on a change in pull request #5: Force in thread
periodically
URL: https://github.com/apache/incubator-iotdb/pull/5#discussion_r249281088
##########
File path:
iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
##########
@@ -75,41 +75,48 @@ public void writeLogTest() throws IOException {
return;
}
int[] batchSizes = new int[]{100, 500, 1000, 5000, 10000};
+ long[] forceCycle = new long[]{10, 0};
int oldBatchSize = config.flushWalThreshold;
+ long oldForceCycle = config.forceWalPeriodInMs;
for (int j = 0; j < batchSizes.length; j++) {
- config.flushWalThreshold = batchSizes[j];
- File tempRestore = new File("testtemp", "restore");
- File tempProcessorStore = new File("testtemp", "processorStore");
- tempRestore.getParentFile().mkdirs();
- tempRestore.createNewFile();
- tempProcessorStore.createNewFile();
-
- WriteLogNode logNode = new ExclusiveWriteLogNode("root.testLogNode",
tempRestore.getPath(),
- tempProcessorStore.getPath());
-
- long time = System.currentTimeMillis();
- for (int i = 0; i < 1000000; i++) {
- InsertPlan bwInsertPlan = new InsertPlan(1, "logTestDevice", 100,
- Arrays.asList("s1", "s2", "s3", "s4"),
- Arrays.asList("1.0", "15", "str", "false"));
- UpdatePlan updatePlan = new UpdatePlan(0, 100, "2.0", new
Path("root.logTestDevice.s1"));
- DeletePlan deletePlan = new DeletePlan(50, new
Path("root.logTestDevice.s1"));
-
- logNode.write(bwInsertPlan);
- logNode.write(updatePlan);
- logNode.write(deletePlan);
+ for(int k=0; k < forceCycle.length; k++) {
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services