Send API timing to statsd for all requests, not just writes
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index b398ecd..84708e7 100644 (file)
@@ -535,11 +535,9 @@ class ApiMain extends ApiBase {
                        $this->executeAction();
                        $runTime = microtime( true ) - $t;
                        $this->logRequest( $runTime );
-                       if ( $this->mModule->isWriteMode() && $this->getRequest()->wasPosted() ) {
-                               MediaWikiServices::getInstance()->getStatsdDataFactory()->timing(
-                                       'api.' . $this->mModule->getModuleName() . '.executeTiming', 1000 * $runTime
-                               );
-                       }
+                       MediaWikiServices::getInstance()->getStatsdDataFactory()->timing(
+                               'api.' . $this->mModule->getModuleName() . '.executeTiming', 1000 * $runTime
+                       );
                } catch ( Exception $e ) {
                        $this->handleException( $e );
                        $this->logRequest( microtime( true ) - $t, $e );