Object built-in object

Object HeapSnapshot

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

Inheritance

Member attributes

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 the specified heap snapshot

1
Object HeapSnapshot.diff(HeapSnapshot before);

Call parameters:

  • before : HeapSnapshot, the heap snapshot to be compared

Return result:

  • Object , returns the comparison result of the heap snapshot

getNodeById

Get heap view node based on ID

1
HeapGraphNode HeapSnapshot.getNodeById(Integer id);

Call parameters:

  • id : Integer, numeric node ID

Return result:


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 returns "[Native Object]", the object can be re-implemented according to its own characteristics

1
String HeapSnapshot.toString();

Return result:

  • String , returns the string representation of the object

toJSON

Returns the JSON format representation of the object, generally returns a collection of readable attributes defined by the object

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

Call parameters:

  • key : String, unused

Return result:

  • Value , returns a value containing JSON serializable