« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for queryShapeStats (0.000 sec.)
Application Performance Monitoring (APM) | PHP 8.3 9414
Application Performance Monitoring (APM) The extension contains an event subscriber API, which allows applications to monitor commands and internal activity pertaining to the » Server Discovery and Monitoring Specification . This tutorial w ... class QueryTimeCollector implements \MongoDB\Driver\Monitoring\CommandSubscriber { private $pendingCommands = []; private $queryShapeStats = []; /* Creates a query shape out of the filter argument. Right now it only * takes the top level fields into account */ ... oid { $requestId = $event -> getRequestId (); if ( array_key_exists ( $requestId , $this -> pendingCommands ) ) { $this -> queryShapeStats [ $this -> pendingCommands [ $requestId ]][ 'count' ]++; $this -> queryShapeStats [ $this -> pendingCommands [ $requestId ... ) { unset( $this -> pendingCommands [ $event -> getRequestId ()] ); } } public function __destruct () { foreach( $this -> queryShapeStats as $shape => $stats ) { echo "Shape: " , $shape , " (" , $stats [ 'count' ], ")\n " , $stats [ 'duration' ] / $stats [ 'co ...
https://man.mtool.work/php/8.3/mongodb.tutorial.apm.html
PREV 1 NEXT