Skip to content

Commit e9658e0

Browse files
authored
remove mock data from the performance page (#18)
1 parent f4fa1a0 commit e9658e0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/performance/performance.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class PerformanceScreen extends Screen {
9191
serviceInfo.service
9292
.getCpuProfile(_isolateId, 'UserVM')
9393
.then((CpuProfile profile) async {
94-
// TODO:
94+
// TODO(devoncarew):
9595
print(profile);
9696

9797
final _CalcProfile calc = new _CalcProfile(profile);
@@ -138,7 +138,7 @@ class PerformanceScreen extends Screen {
138138
perfTable.setRows(<PerfData>[]);
139139

140140
perfTable.onSelect.listen((PerfData data) {
141-
// TODO:
141+
// TODO(devoncarew):
142142
print(data);
143143
});
144144

@@ -252,8 +252,6 @@ class CpuTracker {
252252
static const Duration kMaxGraphTime = Duration(minutes: 1);
253253
static const Duration kUpdateDelay = Duration(seconds: 1);
254254

255-
static final math.Random rnd = new math.Random();
256-
257255
VmService service;
258256
Timer _pollingTimer;
259257
final StreamController<Null> _changeController =
@@ -275,8 +273,7 @@ class CpuTracker {
275273
return;
276274
}
277275

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.
280277

281278
_pollingTimer = new Timer(kUpdateDelay, _pollCpu);
282279
}
@@ -288,6 +285,7 @@ class CpuTracker {
288285

289286
int get _lastValue => samples.isEmpty ? null : samples.last;
290287

288+
// ignore: unused_element
291289
void _addSample(int sample) {
292290
samples.add(sample);
293291

0 commit comments

Comments
 (0)