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

Unified Diff: runtime/observatory/lib/src/elements/metric/graph.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/metric/graph.dart
diff --git a/runtime/observatory/lib/src/elements/metric/graph.dart b/runtime/observatory/lib/src/elements/metric/graph.dart
index cc0d370f7e41dd82c07b39eeeb11a9f06dcabad9..4286f553e83f26c65783f2155ba7a4369ecdc14f 100644
--- a/runtime/observatory/lib/src/elements/metric/graph.dart
+++ b/runtime/observatory/lib/src/elements/metric/graph.dart
@@ -24,9 +24,9 @@ class MetricGraphElement extends HtmlElement implements Renderable {
M.IsolateRef get isolate => _isolate;
M.Metric get metric => _metric;
- factory MetricGraphElement(M.IsolateRef isolate, M.Metric metric,
- M.MetricRepository metrics,
- {RenderingQueue queue}) {
+ factory MetricGraphElement(
+ M.IsolateRef isolate, M.Metric metric, M.MetricRepository metrics,
+ {RenderingQueue queue}) {
assert(isolate != null);
assert(metric != null);
assert(metrics != null);
@@ -56,15 +56,17 @@ class MetricGraphElement extends HtmlElement implements Renderable {
}
final _columns = [
- new ChartColumnSpec(label: 'Time', type: ChartColumnSpec.TYPE_TIMESTAMP),
- new ChartColumnSpec(label: 'Value', formatter: (v) => v.toString())
+ new ChartColumnSpec(label: 'Time', type: ChartColumnSpec.TYPE_TIMESTAMP),
+ new ChartColumnSpec(label: 'Value', formatter: (v) => v.toString())
];
void render() {
final min = _metrics.getMinValue(_isolate, _metric);
final max = _metrics.getMaxValue(_isolate, _metric);
- final rows = _metrics.getSamples(_isolate, _metric).map((s) =>
- [s.time.millisecondsSinceEpoch, s.value]).toList();
+ final rows = _metrics
+ .getSamples(_isolate, _metric)
+ .map((s) => [s.time.millisecondsSinceEpoch, s.value])
+ .toList();
final current = rows.last.last;
var message = 'current: $current';
@@ -77,34 +79,47 @@ class MetricGraphElement extends HtmlElement implements Renderable {
final host = new DivElement();
children = [
- new DivElement()..classes = ['memberList']
+ new DivElement()
+ ..classes = ['memberList']
..children = [
- new DivElement()..classes = ['memberItem']
- ..children = min == null ? const [] : [
- new DivElement()..classes = ['memberName']
- ..text = 'min',
- new DivElement()..classes = ['memberValue']
- ..text = '$min'
- ],
- new DivElement()..classes = ['memberItem']
+ new DivElement()
+ ..classes = ['memberItem']
+ ..children = min == null
+ ? const []
+ : [
+ new DivElement()
+ ..classes = ['memberName']
+ ..text = 'min',
+ new DivElement()
+ ..classes = ['memberValue']
+ ..text = '$min'
+ ],
+ new DivElement()
+ ..classes = ['memberItem']
..children = [
- new DivElement()..classes = ['memberName']
+ new DivElement()
+ ..classes = ['memberName']
..text = 'current',
- new DivElement()..classes = ['memberValue']
+ new DivElement()
+ ..classes = ['memberValue']
..text = '$current'
],
- new DivElement()..classes = ['memberItem']
- ..children = max == null ? const [] : [
- new DivElement()..classes = ['memberName']
- ..text = 'max',
- new DivElement()..classes = ['memberValue']
- ..text = '$max'
- ]
+ new DivElement()
+ ..classes = ['memberItem']
+ ..children = max == null
+ ? const []
+ : [
+ new DivElement()
+ ..classes = ['memberName']
+ ..text = 'max',
+ new DivElement()
+ ..classes = ['memberValue']
+ ..text = '$max'
+ ]
],
- new DivElement()..classes = ['graph']
- ..children = [
- host
- ]
+ new DivElement()
+ ..classes = ['graph']
+ ..children = [host]
];
if (rows.length <= 1) {
return;
« no previous file with comments | « runtime/observatory/lib/src/elements/metric/details.dart ('k') | runtime/observatory/lib/src/elements/metrics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698