Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b49d4ed4
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b49d4ed4
编写于
8月 25, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: remove debug info
上级
f6b39e59
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
6 deletion
+37
-6
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+1
-1
source/util/test/hashTest.cpp
source/util/test/hashTest.cpp
+36
-5
未找到文件。
source/libs/scheduler/src/schRemote.c
浏览文件 @
b49d4ed4
...
...
@@ -1117,7 +1117,7 @@ int32_t schBuildAndSendMsg(SSchJob *pJob, SSchTask *pTask, SQueryNodeAddr *addr,
break
;
}
#if
0
#if
1
SSchTrans
trans
=
{.
pTrans
=
pJob
->
conn
.
pTrans
,
.
pHandle
=
SCH_GET_TASK_HANDLE
(
pTask
)};
code
=
schAsyncSendMsg
(
pJob
,
pTask
,
&
trans
,
addr
,
msgType
,
msg
,
msgSize
,
persistHandle
,
(
rpcCtx
.
args
?
&
rpcCtx
:
NULL
));
msg
=
NULL
;
...
...
source/util/test/hashTest.cpp
浏览文件 @
b49d4ed4
...
...
@@ -295,15 +295,44 @@ void perfTest() {
int64_t
end100m
=
taosGetTimestampMs
();
int64_t
end100mCt
=
taosHashGetCompTimes
(
hash100m
);
int64_t
start100mS
=
taosGetTimestampMs
();
int64_t
start100mSCt
=
taosHashGetCompTimes
(
hash100m
);
SArray
*
sArray
[
1000
]
=
{
0
};
for
(
int64_t
i
=
0
;
i
<
1000
;
++
i
)
{
sArray
[
i
]
=
taosArrayInit
(
100000
,
9
);
}
int64_t
cap
=
4
;
while
(
cap
<
100000000
)
cap
=
(
cap
<<
1u
);
_hash_fn_t
hashFp
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
int32_t
slotR
=
cap
/
1000
+
1
;
for
(
int64_t
i
=
0
;
i
<
10000000
;
++
i
)
{
ASSERT
(
taosHashGet
(
hash100m
,
name
+
(
i
%
50000000
)
*
9
,
9
));
char
*
p
=
name
+
(
i
%
50000000
)
*
9
;
uint32_t
v
=
(
*
hashFp
)(
p
,
9
);
taosArrayPush
(
sArray
[(
v
%
cap
)
/
slotR
],
p
);
}
SArray
*
slArray
=
taosArrayInit
(
100000000
,
9
);
for
(
int64_t
i
=
0
;
i
<
1000
;
++
i
)
{
int32_t
num
=
taosArrayGetSize
(
sArray
[
i
]);
printf
(
"%d "
,
num
);
SArray
*
pArray
=
sArray
[
i
];
for
(
int64_t
m
=
0
;
m
<
num
;
++
m
)
{
char
*
p
=
(
char
*
)
taosArrayGet
(
pArray
,
m
);
ASSERT
(
taosArrayPush
(
slArray
,
p
));
}
}
printf
(
"
\n
"
);
int64_t
start100mS
=
taosGetTimestampMs
();
int64_t
start100mSCt
=
taosHashGetCompTimes
(
hash100m
);
int32_t
num
=
taosArrayGetSize
(
slArray
);
for
(
int64_t
i
=
0
;
i
<
num
;
++
i
)
{
ASSERT
(
taosHashGet
(
hash100m
,
(
char
*
)
TARRAY_GET_ELEM
(
slArray
,
i
),
9
));
}
int64_t
end100mS
=
taosGetTimestampMs
();
int64_t
end100mSCt
=
taosHashGetCompTimes
(
hash100m
);
for
(
int64_t
i
=
0
;
i
<
1000
;
++
i
)
{
taosArrayDestroy
(
sArray
[
i
]);
}
taosArrayDestroy
(
slArray
);
printf
(
"1h
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end1h
-
start1h
,
end1hCt
-
start1hCt
);
printf
(
"1s
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end1s
-
start1s
,
end1sCt
-
start1sCt
);
...
...
@@ -312,6 +341,7 @@ void perfTest() {
printf
(
"1m
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end1m
-
start1m
,
end1mCt
-
start1mCt
);
printf
(
"10m
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end10m
-
start10m
,
end10mCt
-
start10mCt
);
printf
(
"100m
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end100m
-
start100m
,
end100mCt
-
start100mCt
);
printf
(
"100mS
\t
%"
PRId64
"ms,%"
PRId64
"
\n
"
,
end100mS
-
start100mS
,
end100mSCt
-
start100mSCt
);
taosHashCleanup
(
hash1h
);
taosHashCleanup
(
hash1s
);
...
...
@@ -345,7 +375,8 @@ void perfTest() {
ASSERT(taosHashGet(mhash[i%1000], name + i * 9, 9));
}
#else
for
(
int64_t
i
=
0
;
i
<
10000000
;
++
i
)
{
// for (int64_t i = 0; i < 10000000; ++i) {
for
(
int64_t
i
=
0
;
i
<
50000000
;
i
+=
5
)
{
ASSERT
(
taosHashGet
(
mhash
[
i
/
50000
],
name
+
i
*
9
,
9
));
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录