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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1573283003: Add a new 'summary' performance tag. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 2ea723187c52c9e667970f060fc0e9de5f264c14..4714557e35a910b1a9a07d958b866ce1cca77006 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -488,27 +488,29 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
- AnalysisTarget target = entry.target;
- // TYPE_PROVIDER
- if (target is AnalysisContextTarget && result == TYPE_PROVIDER) {
- DartSdk dartSdk = sourceFactory.dartSdk;
- if (dartSdk != null) {
- AnalysisContext sdkContext = dartSdk.context;
- if (!identical(sdkContext, this) &&
- sdkContext is InternalAnalysisContext) {
- return sdkContext.aboutToComputeResult(entry, result);
+ return PerformanceStatistics.summary.makeCurrentWhile(() {
+ AnalysisTarget target = entry.target;
+ // TYPE_PROVIDER
+ if (target is AnalysisContextTarget && result == TYPE_PROVIDER) {
+ DartSdk dartSdk = sourceFactory.dartSdk;
+ if (dartSdk != null) {
+ AnalysisContext sdkContext = dartSdk.context;
+ if (!identical(sdkContext, this) &&
+ sdkContext is InternalAnalysisContext) {
+ return sdkContext.aboutToComputeResult(entry, result);
+ }
}
}
- }
- // A result for a Source.
- Source source = target.source;
- if (source != null) {
- InternalAnalysisContext context = _cache.getContextFor(source);
- if (!identical(context, this)) {
- return context.aboutToComputeResult(entry, result);
+ // A result for a Source.
+ Source source = target.source;
+ if (source != null) {
+ InternalAnalysisContext context = _cache.getContextFor(source);
+ if (!identical(context, this)) {
+ return context.aboutToComputeResult(entry, result);
+ }
}
- }
- return false;
+ return false;
+ });
}
@override
@@ -1061,7 +1063,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
AnalysisResult performAnalysisTask() {
- return PerformanceStatistics.performAnaysis.makeCurrentWhile(() {
+ return PerformanceStatistics.performAnalysis.makeCurrentWhile(() {
_evaluatePendingFutures();
bool done = !driver.performAnalysisTask();
List<ChangeNotice> notices = _getChangeNotices(done);
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698