Object built-in object

ObjectHeapSnapshot

HeapSnapshots record the state of the JS heap at a certain moment

inheritance relationship

member properties

time

Date, time information

1
readonly Date HeapSnapshot.time;

root

HeapGraphNode, the root node of the heap view

1
readonly HeapGraphNode HeapSnapshot.root;

nodes

NArray, a list of heap view nodes

1
readonly NArray HeapSnapshot.nodes;

member function

diff

Compare with specified heap snapshot

1
Object HeapSnapshot.diff(HeapSnapshot before);

Call parameters:

  • before: HeapSnapshot, the heap snapshot to be compared

Return results:

  • Object, returns the comparison result of the heap snapshot

getNodeById

Get the heap view node based on ID

1
HeapGraphNode HeapSnapshot.getNodeById(Integer id);

Call parameters:

  • id: Integer, node ID of numeric type

Return results:


save

Save HeapSnapshot according to the specified name

1
HeapSnapshot.save(String fname) async;

Call parameters:

  • fname: String, snapshot name

toString

Returns the string representation of the object. Generally, "[Native Object]" is returned. The object can be re-implemented according to its own characteristics.

1
String HeapSnapshot.toString();

Return results:

  • String, returns the string representation of the object

toJSON

Returns a JSON format representation of the object, generally returning a collection of readable properties defined by the object.

1
Value HeapSnapshot.toJSON(String key = "");

Call parameters:

  • key: String, not used

Return results:

  • Value, returns a value containing JSON serializable