AllocationMemoryJson class

Structure of the memory JSON file:

{ "allocations": { "version": 2, "dartDevToolsScreen": "memory" "data": Encoded ClassHeapStats see section below. } } Header portion (memoryJsonHeader) e.g.,

{ "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) e.g.,

]

} }

Inheritance

Constructors

AllocationMemoryJson()
AllocationMemoryJson.decode({required String argJsonString, Map<String, dynamic>? argDecodedMap})
Given a JSON string representing an array of HeapSample, decode to a List of HeapSample.

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
no setterinherited
payloadVersion int
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
no setteroverride

Methods

encode(ClassHeapStats sample) String
Encoded ClassHeapDetailStats
override
encodeAnother(ClassHeapStats sample) String
More than one Encoded ClassHeapDetailStats, add a comma and the Encoded ClassHeapDetailStats entry.
override
fromJson(Map<String, dynamic> json) → ClassHeapStats
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upgradeToVersion(Map<String, dynamic> payload, int oldVersion) Map<String, dynamic>
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Allocations Header portion:
no setter

Static Methods

encodeList(List<ClassHeapStats> data) String
Given a list of HeapSample, encode as a Json string.

Constants

allocationFormatVersion → const int