Object built-in object

Object HeapSnapshot

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

Inheritance

#lineWidth: 1.5 #font: Helvetica,sans-Serif #fontSize: 10 #leading: 1.6 #.this: fill=lightgray #.class: fill=white [<class>object|toString();toJSON()] [<this>HeapSnapshot|time;root;nodes|diff();getNodeById();save()] [object] <:- [HeapSnapshot] HeapSnapshot time root nodes diff() getNodeById() save() object toString() toJSON()

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, Return 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