You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ka...@apache.org on 2021/08/04 00:49:02 UTC
[iotdb] branch py_cli_performance updated: test optimized method
This is an automated email from the ASF dual-hosted git repository.
kangrong pushed a commit to branch py_cli_performance
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/py_cli_performance by this push:
new ea2e796 test optimized method
ea2e796 is described below
commit ea2e796d7c54c5cce3bfd975d504073779a70925
Author: kr11 <3095717866.com>
AuthorDate: Wed Aug 4 08:48:25 2021 +0800
test optimized method
---
client-py/iotdb/utils/Tablet.py | 3 +--
client-py/tablet_performance_comparison.py | 10 ++++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/client-py/iotdb/utils/Tablet.py b/client-py/iotdb/utils/Tablet.py
index ea6e456..a1780f4 100644
--- a/client-py/iotdb/utils/Tablet.py
+++ b/client-py/iotdb/utils/Tablet.py
@@ -19,7 +19,6 @@
import struct
from iotdb.utils.IoTDBConstants import TSDataType
-# from iotdb.utils.IoTDBConstants import UseNew
class Tablet(object):
@@ -40,7 +39,7 @@ class Tablet(object):
:param values: 2-D List, the values of each row should be the outer list element.
:param timestamps: List.
"""
- if len(timestamps) != len(values):
+ if not use_new and len(timestamps) != len(values):
raise RuntimeError(
"Input error! len(timestamps) does not equal to len(values)!"
)
diff --git a/client-py/tablet_performance_comparison.py b/client-py/tablet_performance_comparison.py
index d311136..284fb29 100644
--- a/client-py/tablet_performance_comparison.py
+++ b/client-py/tablet_performance_comparison.py
@@ -24,7 +24,6 @@ from iotdb.utils.Tablet import Tablet
import random
import numpy as np
import time
-import math
def create_open_session():
@@ -125,7 +124,7 @@ def performance_test(data_types=tuple([TSDataType.FLOAT]), use_new=True, valid_r
expect_values = "\t\t".join([str(VALUES_OF_TYPES[data_type]) for data_type in data_types])
expect = [str(e) + "\t\t" + expect_values for e in range(row)]
check_query_result(expect, session, f"select {','.join(measurements_)} from {device_id}")
- print("query validation have passed")
+ # print("query validation have passed")
session.close()
end = time.perf_counter()
@@ -136,12 +135,15 @@ def performance_test(data_types=tuple([TSDataType.FLOAT]), use_new=True, valid_r
valid_result = True
-performance_test(data_types=tuple([TSDataType.FLOAT]), use_new=False, valid_result=valid_result, row=3, col=2)
+use_new = True
+# use_new = False
+# performance_test(data_types=tuple([TSDataType.FLOAT]), use_new=use_new, valid_result=valid_result, row=3, col=2)
# performance_test(data_types=tuple([TSDataType.FLOAT]), use_new=True, valid_result=valid_result)
performance_test(
data_types=tuple([TSDataType.BOOLEAN, TSDataType.FLOAT, TSDataType.DOUBLE, TSDataType.INT32, TSDataType.INT64]),
- use_new=False, valid_result=valid_result, row=10, col=10)
+ use_new=use_new, valid_result=valid_result, row=3, col=3)
+
# performance_test(data_types=tuple([TSDataType.BOOLEAN, TSDataType.FLOAT, TSDataType.DOUBLE, TSDataType.INT32, TSDataType.INT64]), use_new=True, valid_result=valid_result)
#
# performance_test(data_types=tuple([TSDataType.BOOLEAN, TSDataType.FLOAT, TSDataType.DOUBLE, TSDataType.INT32, TSDataType.INT64, TSDataType.TEXT]), use_new=False, valid_result=valid_result)