#include <v8-statistics.h>
The delegate is used in Isolate::MeasureMemory API.
It specifies the contexts that need to be measured and gets called when the measurement is completed to report the results.
Definition at line 50 of file v8-statistics.h.
◆ ~MeasureMemoryDelegate()
◆ Default()
Returns a default delegate that resolves the given promise when the memory measurement completes.
- Parameters
-
isolate | the current isolate |
context | the current context |
promise_resolver | the promise resolver that is given the result of the memory measurement. |
mode | the detail level of the result. |
◆ MeasurementComplete()
virtual void MeasurementComplete |
( |
const std::vector< std::pair< Local< Context >, size_t >> & |
context_sizes_in_bytes, |
|
|
size_t |
unattributed_size_in_bytes |
|
) |
| |
|
pure virtual |
This function is called when memory measurement finishes.
- Parameters
-
context_sizes_in_bytes | a vector of (context, size) pairs that includes each context for which ShouldMeasure returned true and that was not garbage collected while the memory measurement was in progress. |
unattributed_size_in_bytes | total size of objects that were not attributed to any context (i.e. are likely shared objects). |
◆ ShouldMeasure()
Returns true if the size of the given context needs to be measured.
The documentation for this class was generated from the following file: