@@ -108,12 +108,92 @@ final class Event {
108108 ///
109109 /// [workingDuration] - json encoded percentile values indicating how long
110110 /// the analysis status was "working".
111+ /// [withFineDependencies] - whether the fine-grained feature is enabled.
112+ ///
113+ /// Then there are three groups of measurements:
114+ /// * file modifications
115+ /// * workspace shape
116+ /// * background analysis
117+ ///
118+ /// The file modifications group includes:
119+ /// [changedFileEventCount] - the number of file change events received.
120+ /// [removedFileEventCount] - the number of file removal events received.
121+ /// [changedFileUniqueCount] - the number of unique files that were changed.
122+ /// [removedFileUniqueCount] - the number of unique files that were removed.
123+ ///
124+ /// The workspace shape group includes:
125+ /// * [immediateFileCountPercentiles] - json encoded percentile values for the
126+ /// number of files in the immediate workspace.
127+ /// * [immediateFileLineCountPercentiles] - json encoded percentile values for
128+ /// the number of lines in the immediate workspace files.
129+ /// * [transitiveFileCountPercentiles] - json encoded percentile values for
130+ /// the number of files in the transitive workspace.
131+ /// * [transitiveFileLineCountPercentiles] - json encoded percentile values
132+ /// for the number of lines in the transitive workspace files.
133+ ///
134+ /// This allows us to understand how big is the workspace, and how it changed
135+ /// over the reported period.
136+ ///
137+ /// The background analysis group includes:
138+ /// * [produceErrorsPotentialFileCount] - the total number of files for which
139+ /// the reported diagnostics could potentially change.
140+ /// * [produceErrorsPotentialFileLineCount] - the total number of lines in
141+ /// files for which the reported diagnostics could potentially change.
142+ /// * [produceErrorsActualFileCount] - the total number of files that actually
143+ /// were analyzed during background analysis.
144+ /// * [produceErrorsActualFileLineCount] - the total number of lines in files
145+ /// that actually were analyzed during background analysis.
146+ /// * [produceErrorsDurationMs] - the total duration in milliseconds for
147+ /// producing diagnostics.
148+ /// * [produceErrorsElementsDurationMs] - the total duration in milliseconds
149+ /// for preparing elements before analysis.
150+ ///
151+ /// This allows us to understand how many files were scheduled for analysis,
152+ /// and how many of these files are served from the cache, because we
153+ /// determined that the change that caused them to be scheduled for analysis
154+ /// actually does not affect resolution and the set of diagnostics, e.g.
155+ /// because the change was in a method body, or to an API that does not
156+ /// affect this specific file (if fine-grained dependencies enabled).
111157 Event .analysisStatistics ({
112158 required String workingDuration,
159+ required bool withFineDependencies,
160+ required int changedFileEventCount,
161+ required int removedFileEventCount,
162+ required int changedFileUniqueCount,
163+ required int removedFileUniqueCount,
164+ required String immediateFileCountPercentiles,
165+ required String immediateFileLineCountPercentiles,
166+ required String transitiveFileCountPercentiles,
167+ required String transitiveFileLineCountPercentiles,
168+ required int produceErrorsPotentialFileCount,
169+ required int produceErrorsPotentialFileLineCount,
170+ required int produceErrorsActualFileCount,
171+ required int produceErrorsActualFileLineCount,
172+ required int produceErrorsDurationMs,
173+ required int produceErrorsElementsDurationMs,
113174 }) : this ._(
114175 eventName: DashEvent .analysisStatistics,
115176 eventData: {
116177 'workingDuration' : workingDuration,
178+ 'withFineDependencies' : withFineDependencies,
179+ 'changedFileUniqueCount' : changedFileUniqueCount,
180+ 'removedFileUniqueCount' : removedFileUniqueCount,
181+ 'changedFileEventCount' : changedFileEventCount,
182+ 'removedFileEventCount' : removedFileEventCount,
183+ 'immediateFileCountPercentiles' : immediateFileCountPercentiles,
184+ 'immediateFileLineCountPercentiles' :
185+ immediateFileLineCountPercentiles,
186+ 'transitiveFileCountPercentiles' : transitiveFileCountPercentiles,
187+ 'transitiveFileLineCountPercentiles' :
188+ transitiveFileLineCountPercentiles,
189+ 'produceErrorsPotentialFileCount' : produceErrorsPotentialFileCount,
190+ 'produceErrorsPotentialFileLineCount' :
191+ produceErrorsPotentialFileLineCount,
192+ 'produceErrorsActualFileCount' : produceErrorsActualFileCount,
193+ 'produceErrorsActualFileLineCount' :
194+ produceErrorsActualFileLineCount,
195+ 'produceErrorsDurationMs' : produceErrorsDurationMs,
196+ 'produceErrorsElementsDurationMs' : produceErrorsElementsDurationMs,
117197 },
118198 );
119199
0 commit comments