This lets us capture some basic endpoint timing data that is
lacking now, such as upload API call time.
Change-Id: If0627e2d78d82b22ed6bdaaa0fa7fe5f20ef50b1
if ( $this->mInternalMode ) {
$this->executeAction();
} else {
+ $start = microtime( true );
$this->executeActionWithErrorHandling();
+ if ( $this->isWriteMode() && $this->getRequest()->wasPosted() ) {
+ $timeMs = 1000 * max( 0, microtime( true ) - $start );
+ $this->getStats()->timing(
+ 'api.' . $this->getModuleName() . '.executeTiming', $timeMs );
+ }
}
}