@@ -91,7 +91,7 @@ class PerformanceScreen extends Screen {
91
91
serviceInfo.service
92
92
.getCpuProfile (_isolateId, 'UserVM' )
93
93
.then ((CpuProfile profile) async {
94
- // TODO:
94
+ // TODO(devoncarew) :
95
95
print (profile);
96
96
97
97
final _CalcProfile calc = new _CalcProfile (profile);
@@ -138,7 +138,7 @@ class PerformanceScreen extends Screen {
138
138
perfTable.setRows (< PerfData > []);
139
139
140
140
perfTable.onSelect.listen ((PerfData data) {
141
- // TODO:
141
+ // TODO(devoncarew) :
142
142
print (data);
143
143
});
144
144
@@ -252,8 +252,6 @@ class CpuTracker {
252
252
static const Duration kMaxGraphTime = Duration (minutes: 1 );
253
253
static const Duration kUpdateDelay = Duration (seconds: 1 );
254
254
255
- static final math.Random rnd = new math.Random ();
256
-
257
255
VmService service;
258
256
Timer _pollingTimer;
259
257
final StreamController <Null > _changeController =
@@ -275,8 +273,7 @@ class CpuTracker {
275
273
return ;
276
274
}
277
275
278
- final int sample = (_lastValue ?? 50 ) + rnd.nextInt (20 ) - 10 ;
279
- _addSample (sample.clamp (0 , 100 ));
276
+ // TODO(devoncarew): Poll the VM for the CPU load.
280
277
281
278
_pollingTimer = new Timer (kUpdateDelay, _pollCpu);
282
279
}
@@ -288,6 +285,7 @@ class CpuTracker {
288
285
289
286
int get _lastValue => samples.isEmpty ? null : samples.last;
290
287
288
+ // ignore: unused_element
291
289
void _addSample (int sample) {
292
290
samples.add (sample);
293
291
0 commit comments