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

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

Issue 956103002: Add instrumentation (issue 22572) (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/analyzer/lib/instrumentation/instrumentation.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | 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 7ca2b2a9ae399543259c8b379315557f51f94c75..995f951aaa3b2766e9e945891bd6e0ae9dea3cb3 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -402,6 +402,18 @@ abstract class AnalysisContext {
List<Source> get librarySources;
/**
+ * Return a client-provided name used to identify this context, or `null` if
+ * the client has not provided a name.
+ */
+ String get name;
+
+ /**
+ * Set the client-provided name used to identify this context to the given
+ * [name].
+ */
+ set name(String name);
+
+ /**
* The stream that is notified when sources have been added or removed,
* or the source's content has changed.
*/
@@ -931,6 +943,12 @@ class AnalysisContextImpl implements InternalAnalysisContext {
final int _id = _NEXT_ID++;
/**
+ * A client-provided name used to identify this context, or `null` if the
+ * client has not provided a name.
+ */
+ String name;
+
+ /**
* The set of analysis options controlling the behavior of this context.
*/
AnalysisOptionsImpl _options = new AnalysisOptionsImpl();
@@ -6838,6 +6856,13 @@ abstract class AnalysisTask {
*/
void _safelyPerform() {
try {
+ String contextName = context.name;
+ if (contextName == null) {
+ contextName = 'unnamed';
+ }
+ AnalysisEngine.instance.instrumentationService.logAnalysisTask(
+ contextName,
+ taskDescription);
internalPerform();
} on AnalysisException catch (exception) {
rethrow;
@@ -9703,6 +9728,9 @@ abstract class InternalAnalysisContext implements AnalysisContext {
*/
List<Source> get prioritySources;
+ /** A factory to override how [ResolverVisitor] is created. */
+ ResolverVisitorFactory get resolverVisitorFactory;
+
/**
* Returns a statistics about this context.
*/
@@ -9717,9 +9745,6 @@ abstract class InternalAnalysisContext implements AnalysisContext {
*/
TypeProvider get typeProvider;
- /** A factory to override how [ResolverVisitor] is created. */
- ResolverVisitorFactory get resolverVisitorFactory;
-
/** A factory to override how [TypeResolverVisitor] is created. */
TypeResolverVisitorFactory get typeResolverVisitorFactory;
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698