From: Aaron Schulz Date: Sun, 25 Oct 2015 03:59:25 +0000 (-0700) Subject: Measure commitMasterChanges() run time X-Git-Tag: 1.31.0-rc.0~9215^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=efb441883937a455562b14cd9407cb6d7b00c6db;p=lhc%2Fweb%2Fwiklou.git Measure commitMasterChanges() run time Change-Id: Icf36ce5bc5b6997aec1b43e5d271ad196ab7bcb6 --- diff --git a/includes/db/loadbalancer/LBFactory.php b/includes/db/loadbalancer/LBFactory.php index e7b762740a..86f0110256 100644 --- a/includes/db/loadbalancer/LBFactory.php +++ b/includes/db/loadbalancer/LBFactory.php @@ -200,7 +200,10 @@ abstract class LBFactory { * Commit changes on all master connections */ public function commitMasterChanges() { + $start = microtime( true ); $this->forEachLBCallMethod( 'commitMasterChanges' ); + $timeMs = 1000 * ( microtime( true ) - $start ); + RequestContext::getMain()->getStats()->timing( "db.commit-masters", $timeMs ); } /**