summarize(summaryContext)
Description |
Executes when the When you add custom logic to this entry point function, that logic is applied to the result set. For information about the context object provided to this entry point, see summaryContext. |
Returns |
Void |
Since |
2015.2 |
Parameters
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
Object |
Required |
Holds statistics regarding the execution of a map/reduce script. For a description of each property in this object, see summaryContext Object Members. |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see Map/Reduce Script Samples.
...
function summarize(summary)
{
var type = summary.toString();
log.audit(type + ' Usage Consumed', summary.usage);
log.audit(type + ' Concurrency Number ', summary.concurrency);
log.audit(type + ' Number of Yields', summary.yields);
var contents = '';
summary.output.iterator().each(function (key, value)
{
contents += (key + ' ' + value + '\n');
return true;
});
...