This is an automated email from the ASF dual-hosted git repository.

leirui pushed a commit to branch research/M4-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/research/M4-visualization by 
this push:
     new 2777b7e133 milestone
2777b7e133 is described below

commit 2777b7e133d3e5423766d48ce76efd43fdf65fe5
Author: Lei Rui <[email protected]>
AuthorDate: Sun Oct 9 21:32:35 2022 +0800

    milestone
---
 .../session/MyRealDataTest1_WriteAndQuery.java     | 101 ++++++++++++++++-----
 .../encoding/decoder/DeltaBinaryDecoder.java       |  36 ++++----
 2 files changed, 95 insertions(+), 42 deletions(-)

diff --git 
a/session/src/test/java/org/apache/iotdb/session/MyRealDataTest1_WriteAndQuery.java
 
b/session/src/test/java/org/apache/iotdb/session/MyRealDataTest1_WriteAndQuery.java
index 4b2402214e..c6fa88c7a7 100644
--- 
a/session/src/test/java/org/apache/iotdb/session/MyRealDataTest1_WriteAndQuery.java
+++ 
b/session/src/test/java/org/apache/iotdb/session/MyRealDataTest1_WriteAndQuery.java
@@ -101,6 +101,31 @@ public class MyRealDataTest1_WriteAndQuery {
   //  private static long regularTimeInterval = 10000900L;
   //  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: 
CPV
 
+  private static String device = "root.debs2012";
+  private static String measurement = "mf03";
+  private static TSDataType tsDataType = TSDataType.INT64; // 
TSDataType.DOUBLE;
+  private static String timestamp_precision = "ns"; // ns, us, ms
+  private static long dataMinTime = 1329955200008000000L;
+  private static long dataMaxTime = 1329965999991000000L;
+  private static long total_time_length = dataMaxTime - dataMinTime;
+  private static int total_point_number = 1076102;
+  private static int iotdb_chunk_point_size = 100000;
+  private static long chunkAvgTimeLen =
+      (long)
+          Math.ceil(
+              total_time_length / Math.ceil(total_point_number * 1.0 / 
iotdb_chunk_point_size));
+  private static String filePath =
+      
"D:\\github\\m4-lsm\\M4-visualization-exp\\src\\main\\java\\org\\apache\\iotdb\\datasets\\MF03_2.csv";
+  private static int deletePercentage = 0; // 0 means no deletes. 0-100
+  private static int deleteLenPercentage = 0; // 0-100 
每次删除的时间长度,用chunkAvgTimeLen的百分比表示
+  private static int timeIdx = 0; // 时间戳idx,从0开始
+  private static int valueIdx = 1; // 值idx,从0开始
+  private static int w = 2;
+  private static long range = total_time_length;
+  private static boolean enableRegularityTimeDecode = true;
+  private static long regularTimeInterval = 10000000L;
+  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: CPV
+
   //  private static String device = 
"root.kobelco.trans.03.1090001603.2401604";
   //  private static String measurement = "KOB_0002_00_67";
   //  private static TSDataType tsDataType = TSDataType.INT64; // 
TSDataType.DOUBLE;
@@ -116,6 +141,33 @@ public class MyRealDataTest1_WriteAndQuery {
   //              total_time_length / Math.ceil(total_point_number * 1.0 / 
iotdb_chunk_point_size));
   //  private static String filePath =
   //
+  //
+  // 
"D:\\github\\m4-lsm\\M4-visualization-exp\\src\\main\\java\\org\\apache\\iotdb\\datasets\\KOB.csv";
+  //  private static int deletePercentage = 0; // 0 means no deletes. 0-100
+  //  private static int deleteLenPercentage = 0; // 0-100 
每次删除的时间长度,用chunkAvgTimeLen的百分比表示
+  //  private static int timeIdx = 0; // 时间戳idx,从0开始
+  //  private static int valueIdx = 1; // 值idx,从0开始
+  //  private static int w = 3;
+  //  private static long range = total_time_length;
+  //  private static boolean enableRegularityTimeDecode = true;
+  //  private static long regularTimeInterval = 1000L;
+  //  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: 
CPV
+
+  //  private static String device = 
"root.kobelco.trans.03.1090001603.2401604";
+  //  private static String measurement = "KOB_0002_00_67";
+  //  private static TSDataType tsDataType = TSDataType.INT64; // 
TSDataType.DOUBLE;
+  //  private static String timestamp_precision = "ms"; // ns, us, ms
+  //  private static long dataMinTime = 1616805035000L;
+  //  private static long dataMaxTime = 1627380839000L;
+  //  private static long total_time_length = dataMaxTime - dataMinTime;
+  //  private static int total_point_number = 1860287;
+  //  private static int iotdb_chunk_point_size = 100000;
+  //  private static long chunkAvgTimeLen =
+  //      (long)
+  //          Math.ceil(
+  //              total_time_length / Math.ceil(total_point_number * 1.0 / 
iotdb_chunk_point_size));
+  //  private static String filePath =
+  //
   // 
"D:\\github\\m4-lsm\\M4-visualization-exp\\src\\main\\java\\org\\apache\\iotdb\\datasets\\KOB_2.csv";
   //  private static int deletePercentage = 0; // 0 means no deletes. 0-100
   //  private static int deleteLenPercentage = 0; // 0-100 
每次删除的时间长度,用chunkAvgTimeLen的百分比表示
@@ -127,30 +179,31 @@ public class MyRealDataTest1_WriteAndQuery {
   //  private static long regularTimeInterval = 1000L;
   //  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: 
CPV
 
-  private static String device = "root.sg1";
-  private static String measurement = "RcvTime";
-  private static TSDataType tsDataType = TSDataType.INT64; // 
TSDataType.DOUBLE;
-  private static String timestamp_precision = "ms"; // ns, us, ms
-  private static long dataMinTime = 1616194494000L;
-  private static long dataMaxTime = 1642656230000L;
-  private static long total_time_length = dataMaxTime - dataMinTime;
-  private static int total_point_number = 1330764;
-  private static int iotdb_chunk_point_size = 100000;
-  private static long chunkAvgTimeLen =
-      (long)
-          Math.ceil(
-              total_time_length / Math.ceil(total_point_number * 1.0 / 
iotdb_chunk_point_size));
-  private static String filePath =
-      
"D:\\github\\m4-lsm\\M4-visualization-exp\\src\\main\\java\\org\\apache\\iotdb\\datasets\\RcvTime.csv";
-  private static int deletePercentage = 0; // 0 means no deletes. 0-100
-  private static int deleteLenPercentage = 0; // 0-100 
每次删除的时间长度,用chunkAvgTimeLen的百分比表示
-  private static int timeIdx = 0; // 时间戳idx,从0开始
-  private static int valueIdx = 1; // 值idx,从0开始
-  private static int w = 3;
-  private static long range = total_time_length;
-  private static boolean enableRegularityTimeDecode = true;
-  private static long regularTimeInterval = 2000L;
-  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: CPV
+  //  private static String device = "root.sg1";
+  //  private static String measurement = "RcvTime";
+  //  private static TSDataType tsDataType = TSDataType.INT64; // 
TSDataType.DOUBLE;
+  //  private static String timestamp_precision = "ms"; // ns, us, ms
+  //  private static long dataMinTime = 1616194494000L;
+  //  private static long dataMaxTime = 1642656230000L;
+  //  private static long total_time_length = dataMaxTime - dataMinTime;
+  //  private static int total_point_number = 1330764;
+  //  private static int iotdb_chunk_point_size = 100000;
+  //  private static long chunkAvgTimeLen =
+  //      (long)
+  //          Math.ceil(
+  //              total_time_length / Math.ceil(total_point_number * 1.0 / 
iotdb_chunk_point_size));
+  //  private static String filePath =
+  //
+  // 
"D:\\github\\m4-lsm\\M4-visualization-exp\\src\\main\\java\\org\\apache\\iotdb\\datasets\\RcvTime.csv";
+  //  private static int deletePercentage = 0; // 0 means no deletes. 0-100
+  //  private static int deleteLenPercentage = 0; // 0-100 
每次删除的时间长度,用chunkAvgTimeLen的百分比表示
+  //  private static int timeIdx = 0; // 时间戳idx,从0开始
+  //  private static int valueIdx = 1; // 值idx,从0开始
+  //  private static int w = 3;
+  //  private static long range = total_time_length;
+  //  private static boolean enableRegularityTimeDecode = true;
+  //  private static long regularTimeInterval = 2000L;
+  //  private static String approach = "mac"; // 选择查询执行算法: 1: MAC, 2: MOC, 3: 
CPV
 
   @Before
   public void setUp() throws Exception {
diff --git 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java
 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java
index 78a0d65124..4f91f0b589 100644
--- 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java
+++ 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java
@@ -227,15 +227,15 @@ public abstract class DeltaBinaryDecoder extends Decoder {
 
       if (enableRegularityTimeDecode) {
         long newRegularDelta = regularTimeInterval - minDeltaBase;
-        System.out.println("newRegularDelta = " + newRegularDelta);
-        TsFileConstant.regularNewDeltasStatistics.addValue(newRegularDelta);
+        //        System.out.println("newRegularDelta = " + newRegularDelta);
+        //        
TsFileConstant.regularNewDeltasStatistics.addValue(newRegularDelta);
 
         if (packWidth == 0) {
           for (int i = 0; i < packNum; i++) {
             data[i] = previous + minDeltaBase; // v=0
             previous = data[i];
-            System.out.println("[RL]0");
-            TsFileConstant.countForRegularZero++;
+            //            System.out.println("[RL]0");
+            //            TsFileConstant.countForRegularZero++;
           }
         } else if (newRegularDelta < 0
             || newRegularDelta
@@ -244,19 +244,19 @@ public abstract class DeltaBinaryDecoder extends Decoder {
             long v = BytesUtils.bytesToLong(deltaBuf, packWidth * i, 
packWidth);
             data[i] = previous + minDeltaBase + v;
             previous = data[i];
-            System.out.println("[RL]no");
-            TsFileConstant.countForRegularNOTEqual++;
+            //            System.out.println("[RL]no");
+            //            TsFileConstant.countForRegularNOTEqual++;
           }
         } else {
           //          long start1 = System.nanoTime();
           Map<Integer, byte[]> regularBytes;
           if (allRegularBytes.containsKey(new Pair<>(newRegularDelta, 
packWidth))) {
             regularBytes = allRegularBytes.get(new Pair<>(newRegularDelta, 
packWidth));
-            TsFileConstant.countForHitNewDeltas.addValue(1);
-            System.out.println("here");
+            //            System.out.println("here");
+            //            TsFileConstant.countForHitNewDeltas.addValue(1);
           } else {
-            TsFileConstant.countForNotHitNewDeltas.addValue(1);
-            System.out.println("here");
+            //            System.out.println("here");
+            //            TsFileConstant.countForNotHitNewDeltas.addValue(1);
 
             regularBytes = new HashMap<>();
             for (int i = 0; i < 8; i++) {
@@ -316,8 +316,8 @@ public abstract class DeltaBinaryDecoder extends Decoder {
             byte[] byteArray = regularBytes.get(pos);
 
             int posByteIdx = i * packWidth / 8;
-            System.out.println("byteArray length=" + byteArray.length);
-            
TsFileConstant.byteArrayLengthStatistics.addValue(byteArray.length);
+            //            System.out.println("byteArray length=" + 
byteArray.length);
+            //            
TsFileConstant.byteArrayLengthStatistics.addValue(byteArray.length);
             for (int k = 0; k < byteArray.length; k++, posByteIdx++) {
               byte regular = byteArray[k];
               byte data = deltaBuf[posByteIdx];
@@ -342,13 +342,13 @@ public abstract class DeltaBinaryDecoder extends Decoder {
 
             if (equal) {
               data[i] = previous + regularTimeInterval;
-              System.out.println("[RL]equals");
-              TsFileConstant.countForRegularEqual++;
+              //              System.out.println("[RL]equals");
+              //              TsFileConstant.countForRegularEqual++;
             } else {
               long v = BytesUtils.bytesToLong(deltaBuf, packWidth * i, 
packWidth);
               data[i] = previous + minDeltaBase + v;
-              System.out.println("[RL]no");
-              TsFileConstant.countForRegularNOTEqual++;
+              //              System.out.println("[RL]no");
+              //              TsFileConstant.countForRegularNOTEqual++;
             }
             //            data[i] = previous + regularTimeInterval;
             previous = data[i];
@@ -358,8 +358,8 @@ public abstract class DeltaBinaryDecoder extends Decoder {
         readPack();
       }
 
-      TsFileConstant.allRegularBytesSize.addValue(allRegularBytes.size());
-      System.out.println("allRegularBytes size=" + allRegularBytes.size());
+      //      
TsFileConstant.allRegularBytesSize.addValue(allRegularBytes.size());
+      //      System.out.println("allRegularBytes size=" + 
allRegularBytes.size());
 
       long runTime = System.nanoTime() - start; // ns
       TsFileConstant.timeColumnTS2DIFFLoadBatchCost.addValue(runTime / 
1000.0); // us

Reply via email to