AllocationMemoryJson class
Structure of the memory JSON file
{
"allocations": {
"version": 2,
"dartDevToolsScreen": "memory"
"data": [
# Encoded ClassHeapStats see section below.
]
}
}
{
"allocations": {
"version": 2,
"dartDevToolsScreen": "memory"
"data": [
Encoded Allocations entry (AllocationMemoryJson
)
{
"class" : {
id: "classes/1"
name: "AClassName"
},
"instancesCurrent": 100,
"instancesAccumulated": 0,
"bytesCurrent": 55,
"accumulatedSize": 5,
"_new": [
100,
50,
5
],
"_old": [
0,
0,
0
]
},
Trailer portion (memoryJsonTrailer
)
]
}
}
Properties
-
data
→ List<ClassHeapStats>
-
If data is empty, check isMatchedVersion and isMemoryPayload to
ensure the JSON file loaded is a memory file.
finalinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
isMatchedVersion
→ bool
-
Imported JSON data loaded and
converted, if necessary, to the latest version.
no setterinherited
-
isMemoryPayload
→ bool
-
JSON payload field
"dart<T>DevToolsScreen"
has a value of "memory" e.g.,
"dartDevToolsScreen": "memory"
no setterinherited
-
payloadVersion
→ int
-
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
version
→ int
-
no setteroverride
Static Properties
-
Allocations Header portion:
no setter
Static Methods
-
encodeList(List<ClassHeapStats> data)
→ String
-
Given a list of HeapSample, encode as a Json string.