Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
7124ec2c
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7124ec2c
编写于
4月 01, 2019
作者:
W
wangguibao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix press test case
Change-Id: I8ef15e2d3fa8184c84a1daed07651a9e70d222ac
上级
c93ca648
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
7 deletion
+5
-7
sdk-cpp/demo/text_classification_press.cpp
sdk-cpp/demo/text_classification_press.cpp
+5
-7
未找到文件。
sdk-cpp/demo/text_classification_press.cpp
浏览文件 @
7124ec2c
...
@@ -205,7 +205,7 @@ void thread_worker(PredictorApi *api, int thread_id) {
...
@@ -205,7 +205,7 @@ void thread_worker(PredictorApi *api, int thread_id) {
}
}
g_concurrency
++
;
g_concurrency
++
;
#if 1
#if 1
LOG
(
INFO
)
<<
"Curren
en
t concurrency "
<<
g_concurrency
.
load
();
LOG
(
INFO
)
<<
"Current concurrency "
<<
g_concurrency
.
load
();
#endif
#endif
timeval
start
;
timeval
start
;
...
@@ -228,9 +228,6 @@ void thread_worker(PredictorApi *api, int thread_id) {
...
@@ -228,9 +228,6 @@ void thread_worker(PredictorApi *api, int thread_id) {
#if 1
#if 1
LOG
(
INFO
)
<<
"Done. Current concurrency "
<<
g_concurrency
.
load
();
LOG
(
INFO
)
<<
"Done. Current concurrency "
<<
g_concurrency
.
load
();
#endif
#endif
// res will be returned in callback
usleep
(
50
);
}
// while (true)
}
// while (true)
std
::
vector
<
int
>
*
truth_label
=
local_feed
->
get_labels
();
std
::
vector
<
int
>
*
truth_label
=
local_feed
->
get_labels
();
...
@@ -248,7 +245,7 @@ int main(int argc, char **argv) {
...
@@ -248,7 +245,7 @@ int main(int argc, char **argv) {
PredictorApi
api
;
PredictorApi
api
;
// initialize logger instance
// initialize logger instance
#ifdef BCLOUD
#ifdef BCLOUD
logging
::
LoggingSettings
settings
;
logging
::
LoggingSettings
settings
;
settings
.
logging_dest
=
logging
::
LOG_TO_FILE
;
settings
.
logging_dest
=
logging
::
LOG_TO_FILE
;
...
@@ -347,7 +344,7 @@ int main(int argc, char **argv) {
...
@@ -347,7 +344,7 @@ int main(int argc, char **argv) {
double
qps
=
0.0
;
double
qps
=
0.0
;
if
(
elapse_ms
!=
0
)
{
if
(
elapse_ms
!=
0
)
{
qps
=
(
static_cast
<
double
>
(
count
)
/
elapse_ms
)
*
1000
;
qps
=
(
static_cast
<
double
>
(
count
)
/
(
elapse_ms
/
FLAGS_concurrency
)
)
*
1000
;
}
}
LOG
(
INFO
)
<<
"QPS: "
<<
qps
/
FLAGS_batch_size
<<
"/s"
;
LOG
(
INFO
)
<<
"QPS: "
<<
qps
/
FLAGS_batch_size
<<
"/s"
;
...
@@ -355,7 +352,8 @@ int main(int argc, char **argv) {
...
@@ -355,7 +352,8 @@ int main(int argc, char **argv) {
LOG
(
INFO
)
<<
"Latency statistics: "
;
LOG
(
INFO
)
<<
"Latency statistics: "
;
if
(
round_times
.
size
()
!=
0
)
{
if
(
round_times
.
size
()
!=
0
)
{
LOG
(
INFO
)
<<
"Average ms: "
<<
total_ms
/
round_times
.
size
();
LOG
(
INFO
)
<<
"Average ms: "
<<
static_cast
<
float
>
(
total_ms
)
/
round_times
.
size
();
LOG
(
INFO
)
<<
"50 percent ms: "
<<
round_times
[
percent_pos_50
];
LOG
(
INFO
)
<<
"50 percent ms: "
<<
round_times
[
percent_pos_50
];
LOG
(
INFO
)
<<
"80 percent ms: "
<<
round_times
[
percent_pos_80
];
LOG
(
INFO
)
<<
"80 percent ms: "
<<
round_times
[
percent_pos_80
];
LOG
(
INFO
)
<<
"90 percent ms: "
<<
round_times
[
percent_pos_90
];
LOG
(
INFO
)
<<
"90 percent ms: "
<<
round_times
[
percent_pos_90
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录