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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 2728743003: Temporarily disabling JSON generation for Zone statistics to resolve flakiness in tests until a bet… (Closed)
Patch Set: Removed code that was commented out in previous patch Created 3 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 service; 5 part of service;
6 6
7 // Some value smaller than the object ring, so requesting a large array 7 // Some value smaller than the object ring, so requesting a large array
8 // doesn't result in an expired ref because the elements lapped it in the 8 // doesn't result in an expired ref because the elements lapped it in the
9 // object ring. 9 // object ring.
10 const int kDefaultFieldLimit = 100; 10 const int kDefaultFieldLimit = 100;
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 String _kindString; 3107 String _kindString;
3108 int get memoryHighWatermark => _memoryHighWatermark; 3108 int get memoryHighWatermark => _memoryHighWatermark;
3109 int _memoryHighWatermark; 3109 int _memoryHighWatermark;
3110 List<Zone> get zones => _zones; 3110 List<Zone> get zones => _zones;
3111 final List<Zone> _zones = new List<Zone>(); 3111 final List<Zone> _zones = new List<Zone>();
3112 3112
3113 Thread._empty(ServiceObjectOwner owner) : super._empty(owner); 3113 Thread._empty(ServiceObjectOwner owner) : super._empty(owner);
3114 3114
3115 void _update(Map map, bool mapIsRef) { 3115 void _update(Map map, bool mapIsRef) {
3116 String rawKind = map['kind']; 3116 String rawKind = map['kind'];
3117 List<Map> zoneList = map['zones'];
3118 3117
3119 switch(rawKind) { 3118 switch(rawKind) {
3120 case "kUnknownTask": 3119 case "kUnknownTask":
3121 _kind = M.ThreadKind.unknownTask; 3120 _kind = M.ThreadKind.unknownTask;
3122 _kindString = 'unknown'; 3121 _kindString = 'unknown';
3123 break; 3122 break;
3124 case "kMutatorTask": 3123 case "kMutatorTask":
3125 _kind = M.ThreadKind.mutatorTask; 3124 _kind = M.ThreadKind.mutatorTask;
3126 _kindString = 'mutator'; 3125 _kindString = 'mutator';
3127 break; 3126 break;
(...skipping 11 matching lines...) Expand all
3139 break; 3138 break;
3140 case "kFinalizerTask": 3139 case "kFinalizerTask":
3141 _kind = M.ThreadKind.finalizerTask; 3140 _kind = M.ThreadKind.finalizerTask;
3142 _kindString = 'finalizer'; 3141 _kindString = 'finalizer';
3143 break; 3142 break;
3144 default: 3143 default:
3145 assert(false); 3144 assert(false);
3146 } 3145 }
3147 3146
3148 _memoryHighWatermark = int.parse(map['_memoryHighWatermark']); 3147 _memoryHighWatermark = int.parse(map['_memoryHighWatermark']);
3149
3150 zones.clear();
3151 zoneList.forEach((zone) {
3152 int capacity = zone['capacity'];
3153 int used = zone['used'];
3154 zones.add(new Zone(capacity, used));
3155 });
3156 } 3148 }
3157 } 3149 }
3158 3150
3159 class Zone implements M.Zone { 3151 class Zone implements M.Zone {
3160 int get capacity => _capacity; 3152 int get capacity => _capacity;
3161 int _capacity; 3153 int _capacity;
3162 int get used => _used; 3154 int get used => _used;
3163 int _used; 3155 int _used;
3164 3156
3165 Zone(this._capacity, this._used); 3157 Zone(this._capacity, this._used);
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
4573 var v = list[i]; 4565 var v = list[i];
4574 if ((v is Map) && _isServiceMap(v)) { 4566 if ((v is Map) && _isServiceMap(v)) {
4575 list[i] = owner.getFromMap(v); 4567 list[i] = owner.getFromMap(v);
4576 } else if (v is List) { 4568 } else if (v is List) {
4577 _upgradeList(v, owner); 4569 _upgradeList(v, owner);
4578 } else if (v is Map) { 4570 } else if (v is Map) {
4579 _upgradeMap(v, owner); 4571 _upgradeMap(v, owner);
4580 } 4572 }
4581 } 4573 }
4582 } 4574 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698