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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 935673002: In analyzer, track time spent computing library cycles. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 3e4e7719d531c06c38bfc942d318f2993e850c23..dba8f84c40590bbd9766c7584018d534b5876598 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -3450,7 +3450,12 @@ class AnalysisContextImpl implements InternalAnalysisContext {
try {
AnalysisContextImpl_CycleBuilder builder =
new AnalysisContextImpl_CycleBuilder(this);
- builder.computeCycleContaining(source);
+ PerformanceTag prevTag = PerformanceStatistics.cycles.makeCurrent();
+ try {
+ builder.computeCycleContaining(source);
+ } finally {
+ prevTag.makeCurrent();
+ }
AnalysisContextImpl_TaskData taskData = builder.taskData;
if (taskData != null) {
return taskData;
@@ -10487,6 +10492,11 @@ class PerformanceStatistics {
* The [PerformanceTag] for time spent in linting.
*/
static PerformanceTag lint = new PerformanceTag('lint');
+
+ /**
+ * The [PerformanceTag] for time spent computing cycles.
+ */
+ static PerformanceTag cycles = new PerformanceTag('cycles');
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698