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

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

Issue 3003903002: Hide internal classes from Memory Profile (Closed)
Patch Set: Address CL comments Created 3 years, 3 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
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 AllocationProfileMock implements M.AllocationProfile { 7 class AllocationProfileMock implements M.AllocationProfile {
8 final DateTime lastServiceGC; 8 final DateTime lastServiceGC;
9 final DateTime lastAccumulatorReset; 9 final DateTime lastAccumulatorReset;
10 final M.HeapSpace newSpace; 10 final M.HeapSpace newSpace;
11 final M.HeapSpace oldSpace; 11 final M.HeapSpace oldSpace;
12 final Iterable<M.ClassHeapStats> members; 12 final Iterable<M.ClassHeapStats> members;
13 13
14 const AllocationProfileMock( 14 const AllocationProfileMock(
15 {this.lastServiceGC, 15 {this.lastServiceGC,
16 this.lastAccumulatorReset, 16 this.lastAccumulatorReset,
17 this.newSpace: const HeapSpaceMock(), 17 this.newSpace: const HeapSpaceMock(),
18 this.oldSpace: const HeapSpaceMock(), 18 this.oldSpace: const HeapSpaceMock(),
19 this.members: const []}); 19 this.members: const []});
20 } 20 }
21 21
22 class ClassHeapStatsMock implements M.ClassHeapStats { 22 class ClassHeapStatsMock implements M.ClassHeapStats {
23 final M.ClassRef clazz; 23 final M.ClassRef clazz;
24 final String displayName;
24 final M.Allocations newSpace; 25 final M.Allocations newSpace;
25 final M.Allocations oldSpace; 26 final M.Allocations oldSpace;
26 final int promotedInstances; 27 final int promotedInstances;
27 final int promotedBytes; 28 final int promotedBytes;
28 29
29 const ClassHeapStatsMock( 30 const ClassHeapStatsMock(
30 {this.clazz: const ClassRefMock(), 31 {this.clazz: const ClassRefMock(),
32 this.displayName: null,
31 this.newSpace: const AllocationsMock(), 33 this.newSpace: const AllocationsMock(),
32 this.oldSpace: const AllocationsMock(), 34 this.oldSpace: const AllocationsMock(),
33 this.promotedInstances: 0, 35 this.promotedInstances: 0,
34 this.promotedBytes: 0}); 36 this.promotedBytes: 0});
35 } 37 }
36 38
37 class AllocationsMock implements M.Allocations { 39 class AllocationsMock implements M.Allocations {
38 final M.AllocationCount accumulated; 40 final M.AllocationCount accumulated;
39 final M.AllocationCount current; 41 final M.AllocationCount current;
40 42
41 const AllocationsMock( 43 const AllocationsMock(
42 {this.accumulated: const AllocationCountMock(), 44 {this.accumulated: const AllocationCountMock(),
43 this.current: const AllocationCountMock()}); 45 this.current: const AllocationCountMock()});
44 } 46 }
45 47
46 class AllocationCountMock implements M.AllocationCount { 48 class AllocationCountMock implements M.AllocationCount {
47 final int instances; 49 final int instances;
48 final int bytes; 50 final int bytes;
49 51
50 const AllocationCountMock({this.instances: 0, this.bytes: 0}); 52 const AllocationCountMock({this.instances: 0, this.bytes: 0});
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698