v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
|
#include <v8-statistics.h>
Data Structures | |
struct | Result |
Public Member Functions | |
virtual | ~MeasureMemoryDelegate ()=default |
virtual bool | ShouldMeasure (Local< Context > context)=0 |
virtual void | MeasurementComplete (Result result) |
Static Public Member Functions | |
static std::unique_ptr< MeasureMemoryDelegate > | Default (Isolate *isolate, Local< Context > context, Local< Promise::Resolver > promise_resolver, MeasureMemoryMode mode) |
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.
Both MeasurementComplete() callbacks will be invoked on completion. Each implementation of this class should hence implement only one of them, and leave the other empty.
Definition at line 55 of file v8-statistics.h.
|
virtualdefault |
|
static |
Returns a default delegate that resolves the given promise when the memory measurement completes.
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. |
|
inlinevirtual |
This function is called when memory measurement finishes.
result | the result of the measurement. |
Definition at line 93 of file v8-statistics.h.
Returns true if the size of the given context needs to be measured.