forked from flutter/devtools
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmetrics.dart
More file actions
100 lines (78 loc) · 3.18 KB
/
metrics.dart
File metadata and controls
100 lines (78 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Copyright 2022 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
/// @docImport '../../screens/inspector/inspector_tree_controller.dart';
/// @docImport '../../screens/performance/panes/flutter_frames/flutter_frame_model.dart';
library;
import 'analytics_common.dart';
class MemoryScreenMetrics extends ScreenAnalyticsMetrics {
MemoryScreenMetrics({
this.heapObjectsTotal,
this.heapDiffObjectsBefore,
this.heapDiffObjectsAfter,
});
/// The number of objects in the 'before' heap for a diff calculation (used to
/// provide scale for timing measurements).
final int? heapDiffObjectsBefore;
/// The number of objects in the 'after' heap for a diff calculation (used to
/// provide scale for timing measurements).
final int? heapDiffObjectsAfter;
/// The number of objects in a heap snapshot that was captured.
final int? heapObjectsTotal;
}
class PerformanceScreenMetrics extends ScreenAnalyticsMetrics {
PerformanceScreenMetrics({
this.uiDuration,
this.rasterDuration,
this.shaderCompilationDuration,
this.traceEventCount,
});
/// The duration in microseconds for the UI time of a selected [FlutterFrame].
final Duration? uiDuration;
/// The duration in microseconds for the Raster time of a selected
/// [FlutterFrame].
final Duration? rasterDuration;
/// The duration in microseconds for the shader compilation time of a selected
/// [FlutterFrame].
final Duration? shaderCompilationDuration;
/// The number of trace events that were processed (used to provide scale for
/// timing measurements).
final int? traceEventCount;
}
class ProfilerScreenMetrics extends ScreenAnalyticsMetrics {
ProfilerScreenMetrics({
required this.cpuSampleCount,
required this.cpuStackDepth,
});
/// The number of CPU samples that were processed for a profile (used along
/// with [cpuStackDepth] to provide scale for timing measurements).
final int cpuSampleCount;
/// The stack depth for a profile (used along with [cpuSampleCount] to provide
/// scale for timing measurements).
final int cpuStackDepth;
}
class InspectorScreenMetrics extends ScreenAnalyticsMetrics {
InspectorScreenMetrics({
this.rootSetCount,
this.rowCount,
this.inspectorTreeControllerId,
});
static const summaryTreeGaId = 0;
static const detailsTreeGaId = 1;
/// The number of times the root has been set, since the
/// [InspectorTreeController] with id [inspectorTreeControllerId], has been
/// initialized.
final int? rootSetCount;
/// The number of rows that are in the root being shown to the user, from the
/// [InspectorTreeController] with id [inspectorTreeControllerId].
final int? rowCount;
/// The id of the [InspectorTreeController], for which this event is tracking.
final int? inspectorTreeControllerId;
}
class DeepLinkScreenMetrics extends ScreenAnalyticsMetrics {
DeepLinkScreenMetrics({this.androidAppId, this.iosBundleId});
/// The Android app id of the Flutter project.
final String? androidAppId;
/// The iOS bundle id of the Flutter project.
final String? iosBundleId;
}