Index: pkg/analyzer/lib/task/model.dart |
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart |
index 3fd8ddb8fb733eda8c13b8d11bb56bb1bede0a79..79c922091cba7666a967a87190e6808050ff4174 100644 |
--- a/pkg/analyzer/lib/task/model.dart |
+++ b/pkg/analyzer/lib/task/model.dart |
@@ -170,6 +170,19 @@ abstract class AnalysisTask { |
*/ |
void _safelyPerform() { |
try { |
+ // |
+ // Report that this task is being performed. |
+ // |
+ String contextName = context.name; |
+ if (contextName == null) { |
+ contextName = 'unnamed'; |
+ } |
+ AnalysisEngine.instance.instrumentationService.logAnalysisTask( |
+ contextName, |
+ description); |
+ // |
+ // Gather statistics on the performance of the task. |
+ // |
int count = countMap[runtimeType]; |
countMap[runtimeType] = count == null ? 1 : count + 1; |
Stopwatch stopwatch = stopwatchMap[runtimeType]; |
@@ -178,6 +191,9 @@ abstract class AnalysisTask { |
stopwatchMap[runtimeType] = stopwatch; |
} |
stopwatch.start(); |
+ // |
+ // Actually perform the task. |
+ // |
try { |
internalPerform(); |
} finally { |