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

Unified Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 918383002: Rework analysis server performance measurement code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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') | pkg/analyzer/bin/analyzer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7d77d4a06a22b7bb6fd9c7de9f7461ab6313d46c..eb43c96b424b2208e81e1815586d7269aa197e72 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -18,6 +18,7 @@ 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';
/**
@@ -221,8 +222,14 @@ class PerformAnalysisOperation extends ServerOperation {
return;
}
// process results
- _sendNotices(server, notices);
- _updateIndex(server, notices);
+ PerformanceTag prevTag = ServerPerformanceStatistics.notices.makeCurrent();
+ try {
+ _sendNotices(server, notices);
+ ServerPerformanceStatistics.index.makeCurrent();
+ _updateIndex(server, notices);
+ } finally {
+ prevTag.makeCurrent();
+ }
// continue analysis
server.addOperation(new PerformAnalysisOperation(context, true));
}
@@ -312,8 +319,14 @@ class _DartIndexOperation extends _SingleFileOperation {
@override
void perform(AnalysisServer server) {
- Index index = server.index;
- index.indexUnit(context, unit);
+ PerformanceTag prevTag =
+ ServerPerformanceStatistics.indexOperation.makeCurrent();
+ try {
+ Index index = server.index;
+ index.indexUnit(context, unit);
+ } finally {
+ prevTag.makeCurrent();
+ }
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | pkg/analyzer/bin/analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698