Exemple #1
0
 /**
  * Checks the ping time and adds it to the report.
  *
  * @param SolrService $solr
  */
 protected function checkPingTime(SolrService $solr)
 {
     try {
         $pingQueryTime = $solr->getPingRoundTripRuntime();
         $pingMessage = (int) $pingQueryTime . ' ms';
     } catch (PingFailedException $e) {
         $this->responseStatus = Status::ERROR;
         $pingMessage = 'Ping error: ' . $e->getMessage();
     }
     $this->responseMessage = $this->replaceMarkerInResponse($this->responseMessage, 'PING', $pingMessage);
 }