The MongoDB\Driver\Monitoring\CommandSucceededEvent class
The MongoDB\Driver\Monitoring\CommandSucceededEvent class encapsulates information about a successful command.
Intro
The MongoDB\Driver\Monitoring\CommandSucceededEvent class encapsulates information about a successful command.
Class synopsis
Properties
hostThe hostname of the server that executed the command.
portThe port of the server that executed the command.
commandNameThe command name.
databaseNameThe database name.
durationThe duration of the command in microseconds. The duration is a calculated value that includes the time to send the message and receive the response from the server.
replyThe reply document returned by the server.
operationIdThe operation ID. This may be used to link events together such as bulk writes, which may dispatch multiple commands.
requestIdThe request ID. This may be used to associate this
MongoDB\Driver\Monitoring\CommandSucceededEventwith a correspondingMongoDB\Driver\Monitoring\CommandStartedEvent.serviceIdThe service ID, or null if the server does not support it (i.e. not using load-balanced mode).
serverConnectionIdThe server connection ID, or null if not available.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. The duration property replaces the getDurationMicros method. |
Commandsucceededevent