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

Unified Diff: pkg/analysis_server/lib/src/services/completion/completion_manager.dart

Issue 861153003: improve measurement of completion performance (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: slightly adjust text Created 5 years, 11 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/get_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/completion_manager.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
index 88d1411919cbaa6a48ecdbef5ba4ab45eafc820c..308b8bb4aee590a9d92ef277c6d71149dba0f1e0 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
@@ -124,7 +124,8 @@ class CompletionPerformance {
int offset;
String contents;
int notificationCount = -1;
- int suggestionCount = -1;
+ int suggestionCountFirst = -1;
+ int suggestionCountLast = -1;
Duration _firstNotification;
CompletionPerformance() {
@@ -162,6 +163,14 @@ class CompletionPerformance {
return '$prefix^$suffix';
}
+ String get startTimeAndMs => '${start.millisecondsSinceEpoch} - $start';
+
+ String get suggestionCount {
+ if (notificationCount < 1) return '';
+ if (notificationCount == 1) return '$suggestionCountFirst';
+ return '$suggestionCountFirst, $suggestionCountLast';
+ }
+
void complete([String tag = null]) {
_stopwatch.stop();
_logDuration(tag != null ? tag : 'total time', _stopwatch.elapsed);
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698