- Reference >
- Result Classes >
- MongoDB\MapReduceResult::getTiming()
MongoDB\MapReduceResult::getTiming()
On this page
Definition
-
MongoDB\MapReduceResult::getTiming
Returns timing statistics for the map-reduce operation.
Timing statistics will only be available if the
verbose
option was specified forMongoDB\Collection::mapReduce()
.
Return Values
An array of timing statistics for the map-reduce operation. If no timing statistics are available, the array will be empty.
Examples
This example specifies the verbose
option for
MongoDB\Collection::mapReduce()
and reports the timing statistics
for a map-reduce operation.
The output would then resemble:
array(5) {
["mapTime"]=>
int(163)
["emitLoop"]=>
int(233)
["reduceTime"]=>
int(9)
["mode"]=>
string(5) "mixed"
["total"]=>
int(233)
}
See Also
MongoDB\Collection::mapReduce()
- mapReduce command reference in the MongoDB manual