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

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

Issue 1536083002: completion performance measurement for local status page (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 years 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
Index: pkg/analysis_server/lib/src/services/completion/completion_performance.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
index 614d20545c79caa457862faee616f842ff09fb85..0272fb889a949c645ddb5a1ec5eea5b1f43de16a 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
@@ -45,23 +45,14 @@ class CompletionPerformance {
_logDuration(tag != null ? tag : 'total time', _stopwatch.elapsed);
}
- logElapseTime(String tag, [f() = null]) {
- Duration start;
+ void logElapseTime(String tag) {
Duration end = _stopwatch.elapsed;
- var result;
- if (f == null) {
- start = _startTimes[tag];
- if (start == null) {
- _logDuration(tag, null);
- return null;
- }
- } else {
- result = f();
- start = end;
- end = _stopwatch.elapsed;
+ Duration start = _startTimes[tag];
+ if (start == null) {
+ _logDuration(tag, null);
+ return null;
}
_logDuration(tag, end - start);
- return result;
}
void logFirstNotificationComplete(String tag) {

Powered by Google App Engine
This is Rietveld 408576698