enh: add binary serialization method to node structure

This commit is contained in:
Xiaoyu Wang 2022-09-08 15:43:14 +08:00
parent d5735d608c
commit 3f5746d20b
2 changed files with 1728 additions and 69 deletions

File diff suppressed because it is too large Load Diff

View File

@ -452,10 +452,12 @@ class PlannerTestBaseImpl {
char* pStr = NULL;
int32_t len = 0;
// auto start = chrono::steady_clock::now();
auto start = chrono::steady_clock::now();
DO_WITH_THROW(nodesNodeToString, pRoot, false, &pStr, &len)
// cout << "nodesNodeToString: "
// << chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now() - start).count() << endl;
if (QUERY_NODE_PHYSICAL_PLAN == nodeType(pRoot)) {
cout << "nodesNodeToString: "
<< chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now() - start).count() << "us" << endl;
}
string str(pStr);
taosMemoryFreeClear(pStr);
@ -466,10 +468,10 @@ class PlannerTestBaseImpl {
char* pStr = NULL;
int32_t len = 0;
// auto start = chrono::steady_clock::now();
auto start = chrono::steady_clock::now();
DO_WITH_THROW(nodesNodeToMsg, pRoot, &pStr, &len)
// cout << "nodesNodeToMsg: "
// << chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now() - start).count() << endl;
cout << "nodesNodeToMsg: "
<< chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now() - start).count() << "us" << endl;
SNode* pNode = NULL;
char* pNewStr = NULL;