| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of mocks; | 5 part of mocks; |
| 6 | 6 |
| 7 class HeapSnapshotMock implements M.HeapSnapshot { | 7 class HeapSnapshotMock implements M.HeapSnapshot { |
| 8 final DateTime timestamp; | 8 final DateTime timestamp; |
| 9 final int objects; | 9 final int objects; |
| 10 final int references; | 10 final int references; |
| 11 final int size; | 11 final int size; |
| 12 final M.HeapSnapshotDominatorNode dominatorTree; | 12 final M.HeapSnapshotDominatorNode dominatorTree; |
| 13 final M.HeapSnapshotMergedDominatorNode mergedDominatorTree = null; |
| 13 final Iterable<M.HeapSnapshotClassReferences> classReferences; | 14 final Iterable<M.HeapSnapshotClassReferences> classReferences; |
| 14 | 15 |
| 15 const HeapSnapshotMock( | 16 const HeapSnapshotMock( |
| 16 {this.timestamp, | 17 {this.timestamp, |
| 17 this.objects: 0, | 18 this.objects: 0, |
| 18 this.references: 0, | 19 this.references: 0, |
| 19 this.size: 0, | 20 this.size: 0, |
| 20 this.dominatorTree: const HeapSnapshotDominatorNodeMock(), | 21 this.dominatorTree: const HeapSnapshotDominatorNodeMock(), |
| 21 this.classReferences: const []}); | 22 this.classReferences: const []}); |
| 22 } | 23 } |
| 23 | 24 |
| 24 class HeapSnapshotDominatorNodeMock implements M.HeapSnapshotDominatorNode { | 25 class HeapSnapshotDominatorNodeMock implements M.HeapSnapshotDominatorNode { |
| 25 final int shallowSize; | 26 final int shallowSize; |
| 26 final int retainedSize; | 27 final int retainedSize; |
| 28 final bool isStack = false; |
| 27 final Future<M.ObjectRef> object; | 29 final Future<M.ObjectRef> object; |
| 28 final Iterable<M.HeapSnapshotDominatorNode> children; | 30 final Iterable<M.HeapSnapshotDominatorNode> children; |
| 29 | 31 |
| 30 const HeapSnapshotDominatorNodeMock( | 32 const HeapSnapshotDominatorNodeMock( |
| 31 {this.shallowSize: 1, | 33 {this.shallowSize: 1, |
| 32 this.retainedSize: 1, | 34 this.retainedSize: 1, |
| 33 this.object, | 35 this.object, |
| 34 this.children: const []}); | 36 this.children: const []}); |
| 35 } | 37 } |
| 36 | 38 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 final M.ClassRef target; | 70 final M.ClassRef target; |
| 69 final int count; | 71 final int count; |
| 70 final int shallowSize; | 72 final int shallowSize; |
| 71 final int retainedSize; | 73 final int retainedSize; |
| 72 const HeapSnapshotClassOutboundMock( | 74 const HeapSnapshotClassOutboundMock( |
| 73 {this.target: const ClassRefMock(), | 75 {this.target: const ClassRefMock(), |
| 74 this.count: 1, | 76 this.count: 1, |
| 75 this.shallowSize: 1, | 77 this.shallowSize: 1, |
| 76 this.retainedSize: 2}); | 78 this.retainedSize: 2}); |
| 77 } | 79 } |
| OLD | NEW |