public void calculate ( ServiceMessage message ) { // client to service eval ( message . header ( SERVICE_RECV_TIME ) , message . header ( CLIENT_SEND_TIME ) , ( v1 , v2 ) -> clientToServiceTimer . update ( v1 - v2 , TimeUnit . MILLISECONDS ) ) ; // service to client eval ( message . header ( CLIENT_RECV_TIME ) , message . header ( SERVICE_SEND_TIME ) , ( v1 , v2 ) -> serviceToClientTimer . update ( v1 - v2 , TimeUnit . MILLISECONDS ) ) ; }
Calculates latencies by the headers into received message .