Chromium Code Reviews| Index: pkg/analysis_server/lib/src/operation/operation_analysis.dart |
| diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
| index eb43c96b424b2208e81e1815586d7269aa197e72..cfab1d61bf24521556d38265c5f66eaf9859e5c0 100644 |
| --- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
| +++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
| @@ -18,7 +18,6 @@ import 'package:analyzer/src/generated/engine.dart'; |
| import 'package:analyzer/src/generated/error.dart'; |
| import 'package:analyzer/src/generated/html.dart'; |
| import 'package:analyzer/src/generated/source.dart'; |
| -import 'package:analyzer/src/generated/utilities_general.dart'; |
| /** |
| @@ -222,14 +221,10 @@ class PerformAnalysisOperation extends ServerOperation { |
| return; |
| } |
| // process results |
| - PerformanceTag prevTag = ServerPerformanceStatistics.notices.makeCurrent(); |
| - try { |
| + ServerPerformanceStatistics.notices.makeCurrentWhile(() { |
| _sendNotices(server, notices); |
| - ServerPerformanceStatistics.index.makeCurrent(); |
| _updateIndex(server, notices); |
|
Brian Wilkerson
2015/02/24 22:31:07
The execution of _updateIndex is no longer counted
scheglov
2015/02/24 22:33:05
Yes.
All what it does is just scheduling indexing,
|
| - } finally { |
| - prevTag.makeCurrent(); |
| - } |
| + }); |
| // continue analysis |
| server.addOperation(new PerformAnalysisOperation(context, true)); |
| } |
| @@ -319,14 +314,10 @@ class _DartIndexOperation extends _SingleFileOperation { |
| @override |
| void perform(AnalysisServer server) { |
| - PerformanceTag prevTag = |
| - ServerPerformanceStatistics.indexOperation.makeCurrent(); |
| - try { |
| + ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() { |
| Index index = server.index; |
| index.indexUnit(context, unit); |
| - } finally { |
| - prevTag.makeCurrent(); |
| - } |
| + }); |
| } |
| } |