Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: runtime/observatory/tests/observatory_ui/mocks/objects/heap_snapshot.dart

Issue 2266343002: Converted Observatory heap-snapshot element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Removed debug code Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of mocks;
6
7 class HeapSnapshotMock implements M.HeapSnapshot {
8 final DateTime timestamp;
9 final int objects;
10 final int references;
11 final int size;
12 final M.HeapSnapshotDominatorNode dominatorTree;
13 final Iterable<M.HeapSnapshotClassReferences> classReferences;
14
15 const HeapSnapshotMock({this.timestamp, this.objects: 0,
16 this.references: 0, this.size: 0,
17 this.dominatorTree: const HeapSnapshotDominatorNodeMock(),
18 this.classReferences: const []});
19 }
20
21 class HeapSnapshotDominatorNodeMock implements M.HeapSnapshotDominatorNode {
22 final int shallowSize;
23 final int retainedSize;
24 final Future<M.ObjectRef> object;
25 final Iterable<M.HeapSnapshotDominatorNode> children;
26
27 const HeapSnapshotDominatorNodeMock({this.shallowSize: 1,
28 this.retainedSize: 1,
29 this.object, this.children: const []});
30 }
31
32 class HeapSnapshotClassReferencesMock implements M.HeapSnapshotClassReferences {
33 final M.ClassRef clazz;
34 final int instances;
35 final int shallowSize;
36 final int retainedSize;
37 final Iterable<M.HeapSnapshotClassInbound> inbounds;
38 final Iterable<M.HeapSnapshotClassOutbound> outbounds;
39
40 const HeapSnapshotClassReferencesMock({this.clazz: const ClassRefMock(),
41 this.instances: 1, this.shallowSize: 1,
42 this.retainedSize: 2,
43 this.inbounds: const [],
44 this.outbounds: const []});
45 }
46
47 class HeapSnapshotClassInboundMock implements M.HeapSnapshotClassInbound {
48 final M.ClassRef source;
49 final int count;
50 final int shallowSize;
51 final int retainedSize;
52
53 const HeapSnapshotClassInboundMock({this.source: const ClassRefMock(),
54 this.count: 1, this.shallowSize: 1,
55 this.retainedSize: 2});
56 }
57
58 class HeapSnapshotClassOutboundMock implements M.HeapSnapshotClassOutbound {
59 final M.ClassRef target;
60 final int count;
61 final int shallowSize;
62 final int retainedSize;
63 const HeapSnapshotClassOutboundMock({this.target: const ClassRefMock(),
64 this.count: 1, this.shallowSize: 1,
65 this.retainedSize: 2});
66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698