Skip to content

Commit

Permalink
restore remote time message
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Sep 18, 2018
1 parent 6f1fe6d commit 3c582f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AnalysisFW/src/TFClientRemote.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ void JetImageData::waitForNext(){
inputs["images"] = proto_;

//setup timeout
std::chrono::system_clock::time_point deadline = std::chrono::system_clock::now() + std::chrono::seconds(timeout_);
auto t1 = std::chrono::high_resolution_clock::now();
std::chrono::system_clock::time_point deadline = t1 + std::chrono::seconds(timeout_);
context.set_deadline(deadline);

//make prediction request
Expand All @@ -77,6 +78,9 @@ void JetImageData::waitForNext(){
bool ok = false;
cq.Next(&tag,&ok);

auto t2 = std::chrono::high_resolution_clock::now();
edm::LogInfo("TFClientRemote") << "Remote time: " << std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();

//check result
std::exception_ptr exceptionPtr;
if(ok and status.ok() and tag==(void*)(dataID_+1)){
Expand Down

0 comments on commit 3c582f3

Please sign in to comment.