ObjectHeapSnapshot
HeapSnapshots record the state of the JS heap at a certain moment
inheritance relationship
member properties
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 specified heap snapshot
1Object 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
1HeapGraphNode HeapSnapshot.getNodeById(Integer id);
Call parameters:
- id: Integer, node ID of numeric type
Return results:
- HeapGraphNode, returns 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, "[Native Object]" is returned. The object can be re-implemented according to its own characteristics.
1String 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.
1Value HeapSnapshot.toJSON(String key = "");
Call parameters:
- key: String, not used
Return results:
- Value, returns a value containing JSON serializable