From 99cbd7d54b669136bc14df44c638c0d7ae78bdde Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 21 Aug 2016 17:01:04 +0200 Subject: [PATCH] Floor slave lag before display Seeing slave lags like 15.309758901596 looks scary Change-Id: Ie564670448311364b8492af6b82943312118dc29 --- includes/OutputPage.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index eb3040cd28..74ade3e60c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2547,6 +2547,7 @@ class OutputPage extends ContextSource { public function showLagWarning( $lag ) { $config = $this->getConfig(); if ( $lag >= $config->get( 'SlaveLagWarning' ) ) { + $lag = floor( $lag ); // floor to avoid nano seconds to display $message = $lag < $config->get( 'SlaveLagCritical' ) ? 'lag-warn-normal' : 'lag-warn-high'; -- 2.20.1