File tree Expand file tree Collapse file tree 6 files changed +36
-3
lines changed Expand file tree Collapse file tree 6 files changed +36
-3
lines changed Original file line number Diff line number Diff line change
1
+ ## 8.0.6
2
+ - Added ` Event.analysisStatistics ` for events from Dart Analysis Server, about analysis.
3
+
1
4
## 8.0.5
2
5
- Fix ` Event.flutterWasmDryRun ` fields.
3
6
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ const int kMaxLogFileSize = 25 * (1 << 20);
87
87
const String kLogFileName = 'dart-flutter-telemetry.log' ;
88
88
89
89
/// The current version of the package, should be in line with pubspec version.
90
- const String kPackageVersion = '8.0.5 ' ;
90
+ const String kPackageVersion = '8.0.6 ' ;
91
91
92
92
/// The minimum length for a session.
93
93
const int kSessionDurationMinutes = 30 ;
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ enum DashEvent {
126
126
127
127
// Events for language_server below
128
128
129
+ analysisStatistics (
130
+ label: 'analysis_statistics' ,
131
+ description: 'Dart analyzer statistics' ,
132
+ ),
129
133
clientNotification (
130
134
label: 'client_notification' ,
131
135
description: 'Notifications sent from the client' ,
Original file line number Diff line number Diff line change @@ -103,6 +103,20 @@ final class Event {
103
103
},
104
104
);
105
105
106
+ /// Event that is emitted periodically to report the performance of the
107
+ /// analyzer.
108
+ ///
109
+ /// [workingDuration] - json encoded percentile values indicating how long
110
+ /// the analysis status was "working".
111
+ Event .analysisStatistics ({
112
+ required String workingDuration,
113
+ }) : this ._(
114
+ eventName: DashEvent .analysisStatistics,
115
+ eventData: {
116
+ 'workingDuration' : workingDuration,
117
+ },
118
+ );
119
+
106
120
/// Event that is emitted periodically to report the performance of the
107
121
/// analysis server's handling of a specific kind of request from the client.
108
122
///
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: >-
5
5
# LINT.IfChange
6
6
# When updating this, keep the version consistent with the changelog and the
7
7
# value in lib/src/constants.dart.
8
- version : 8.0.5
8
+ version : 8.0.6
9
9
# LINT.ThenChange(lib/src/constants.dart)
10
10
repository : https://github.com/dart-lang/tools/tree/main/pkgs/unified_analytics
11
11
issue_tracker : https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ import 'package:unified_analytics/src/event.dart';
10
10
import 'package:unified_analytics/unified_analytics.dart' ;
11
11
12
12
void main () {
13
+ test ('Event.analysisStatistics constructed' , () {
14
+ Event generateEvent () =>
15
+ Event .analysisStatistics (workingDuration: 'workingDuration' );
16
+
17
+ final constructedEvent = generateEvent ();
18
+
19
+ expect (generateEvent, returnsNormally);
20
+ expect (constructedEvent.eventName, DashEvent .analysisStatistics);
21
+ expect (constructedEvent.eventData['workingDuration' ], 'workingDuration' );
22
+ expect (constructedEvent.eventData.length, 1 );
23
+ });
24
+
13
25
test ('Event.analyticsCollectionEnabled constructed' , () {
14
26
Event generateEvent () => Event .analyticsCollectionEnabled (status: false );
15
27
@@ -729,7 +741,7 @@ void main() {
729
741
730
742
// Change this integer below if your PR either adds or removes
731
743
// an Event constructor
732
- final eventsAccountedForInTests = 30 ;
744
+ final eventsAccountedForInTests = 31 ;
733
745
expect (eventsAccountedForInTests, constructorCount,
734
746
reason: 'If you added or removed an event constructor, '
735
747
'ensure you have updated '
You can’t perform that action at this time.
0 commit comments