提交 4e6438aa 编写于 作者: G guru4elephant

condition on profile_server to return timestamp

上级 a3ac66fb
......@@ -126,6 +126,8 @@ int GeneralResponseOp::inference() {
// timeline.Pause();
// response_time = timeline.ElapsedUS();
if (req->profile_server()) {
int64_t end = timeline.TimeStampUS();
VLOG(2) << "p size for input blob: " << input_blob->p_size;
for (int i = 0; i < input_blob->p_size; ++i) {
......@@ -134,6 +136,7 @@ int GeneralResponseOp::inference() {
// TODO(guru4elephant): find more elegant way to do this
res->add_profile_time(start);
res->add_profile_time(end);
}
return 0;
}
......
......@@ -124,8 +124,7 @@ int GeneralTextResponseOp::inference() {
var_idx++;
}
// timeline.Pause();
// response_time = timeline.ElapsedUS();
if (req->profile_server()) {
int64_t end = timeline.TimeStampUS();
for (int i = 0; i < input_blob->p_size; ++i) {
......@@ -134,6 +133,7 @@ int GeneralTextResponseOp::inference() {
// TODO(guru4elephant): find more elegant way to do this
res->add_profile_time(start);
res->add_profile_time(end);
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册