If you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so. The callback, which must implement the
nsIMemoryMultiReporterCallback interface, receives values that match the fields in the
In order for a multi-reporter to gather and generate reports, you need to call
collectReports(). This will call the specified callback's
nsIMemoryMultiReporterCallback.callback() method once for each report. This will trigger any needed computation work.
nsIMemoryReporter, which lets all fields except
amountbe accessed without triggering computation.
The sum of all of this multi-reporter's measurements that have a path that starts with "explicit" and are of the kind
Note: This is a hack that makes
void collectReports( in nsIMemoryMultiReporterCallback callback, in nsISupports closure );
nsIMemoryMultiReporterCallbackto call when collection is complete.
An object containing any additional data your
callbackmight need; this gets passed to the callback. You can specify
nullif your callback doesn't require any additional data.