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

Unified Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 2963323002: Add analytics to analyzer-cli and analysis server. (Closed)
Patch Set: update from review comments Created 3 years, 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/domain_server.dart ('k') | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 13c0ebdeaa2b7d98630ddcc1131eed4a1b6b9320..a7cf8ea2bbf474c2f23642f01d31826e71cd48ef 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -76,6 +76,8 @@ class EditDomainHandler extends AbstractRequestHandler {
}
Response format(Request request) {
+ server.options.analytics?.sendEvent('edit', 'format');
+
EditFormatParams params = new EditFormatParams.fromRequest(request);
String file = params.file;
@@ -269,6 +271,8 @@ class EditDomainHandler extends AbstractRequestHandler {
}
Future getPostfixCompletion(Request request) async {
+ server.options.analytics?.sendEvent('edit', 'getPostfixCompletion');
+
var params = new EditGetPostfixCompletionParams.fromRequest(request);
SourceChange change;
@@ -418,6 +422,8 @@ class EditDomainHandler extends AbstractRequestHandler {
}
Future<Null> organizeDirectives(Request request) async {
+ server.options.analytics?.sendEvent('edit', 'organizeDirectives');
+
var params = new EditOrganizeDirectivesParams.fromRequest(request);
// prepare file
String file = params.file;
@@ -687,6 +693,12 @@ class _RefactoringManager {
EMPTY_PROBLEM_LIST, EMPTY_PROBLEM_LIST, EMPTY_PROBLEM_LIST);
// process the request
var params = new EditGetRefactoringParams.fromRequest(_request);
+
+ if (params.kind != null) {
+ server.options.analytics
+ ?.sendEvent('refactor', params.kind.name.toLowerCase());
+ }
+
runZoned(() async {
await _init(params.kind, params.file, params.offset, params.length);
if (initStatus.hasFatalError) {
« no previous file with comments | « pkg/analysis_server/lib/src/domain_server.dart ('k') | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698