| OLD | NEW |
| (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 AllocationProfileMock implements M.AllocationProfile { |
| 8 final DateTime lastServiceGC; |
| 9 final DateTime lastAccumulatorReset; |
| 10 final M.HeapSpace newSpace; |
| 11 final M.HeapSpace oldSpace; |
| 12 final Iterable<M.ClassHeapStats> members; |
| 13 |
| 14 const AllocationProfileMock({this.lastServiceGC, this.lastAccumulatorReset, |
| 15 this.newSpace: const HeapSpaceMock(), |
| 16 this.oldSpace: const HeapSpaceMock(), |
| 17 this.members: const []}); |
| 18 } |
| 19 |
| 20 |
| 21 class ClassHeapStatsMock implements M.ClassHeapStats { |
| 22 final M.ClassRef clazz; |
| 23 final M.Allocations newSpace; |
| 24 final M.Allocations oldSpace; |
| 25 final int promotedInstances; |
| 26 final int promotedBytes; |
| 27 |
| 28 const ClassHeapStatsMock({this.clazz: const ClassRefMock(), |
| 29 this.newSpace: const AllocationsMock(), |
| 30 this.oldSpace: const AllocationsMock(), |
| 31 this.promotedInstances: 0, this.promotedBytes: 0}); |
| 32 } |
| 33 |
| 34 class AllocationsMock implements M.Allocations { |
| 35 final M.AllocationCount accumulated; |
| 36 final M.AllocationCount current; |
| 37 |
| 38 const AllocationsMock({this.accumulated: const AllocationCountMock(), |
| 39 this.current: const AllocationCountMock()}); |
| 40 } |
| 41 |
| 42 class AllocationCountMock implements M.AllocationCount { |
| 43 final int instances; |
| 44 final int bytes; |
| 45 |
| 46 const AllocationCountMock({this.instances: 0, this.bytes: 0}); |
| 47 } |
| OLD | NEW |