Object HeapSnapshot
HeapSnapshots records the state of the JS heap at a certain moment
Inheritance
Member attributes
time
Date, time information
1readonly Date HeapSnapshot.time;
root
HeapGraphNode, The root node of the heap view
1readonly HeapGraphNode HeapSnapshot.root;
nodes
NArray, a list of heap view nodes
1readonly NArray HeapSnapshot.nodes;
Member function
diff
Compare with the specified heap snapshot
1Object 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
1HeapGraphNode HeapSnapshot.getNodeById(Integer id);
Call parameters:
- id: Integer, numeric node ID
Return result:
- HeapGraphNode, Return the obtained heap view node
save
Save HeapSnapshot according to the specified name
1HeapSnapshot.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
1String 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
1Value HeapSnapshot.toJSON(String key = "");
Call parameters:
- key: String, unused
Return result:
- Value, Returns a value containing JSON serializable