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

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

Issue 2917183003: update the analyzer and analysis server perf tags (Closed)
Patch Set: updates for review comments Created 3 years, 6 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
Index: pkg/analyzer/lib/src/generated/utilities_general.dart
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index c1413a5af72fc188c91ac8e37087a6e482104b87..35532b4b61d13e455d7c444cc08a1076fc4fb65a 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -91,7 +91,7 @@ abstract class PerformanceTag {
* Return the [PerformanceTag] that is initially current. This is intended
* to track time when the system is performing unknown operations.
*/
- static PerformanceTag get UNKNOWN => _PerformanceTagImpl.UNKNOWN;
+ static PerformanceTag get unknown => _PerformanceTagImpl.unknown;
/**
* Create a [PerformanceTag] having the given [label]. A [UserTag] will also
@@ -114,6 +114,12 @@ abstract class PerformanceTag {
String get label;
/**
+ * Create a child tag of the current tag. The new tag's name will include the
+ * parent's name.
+ */
+ PerformanceTag createChild(String childTagName);
+
+ /**
* Make this the current tag for the isolate, and return the previous tag.
*/
PerformanceTag makeCurrent();
@@ -138,9 +144,9 @@ class _PerformanceTagImpl implements PerformanceTag {
/**
* The current performance tag for the isolate.
*/
- static _PerformanceTagImpl current = UNKNOWN;
+ static _PerformanceTagImpl current = unknown;
- static final _PerformanceTagImpl UNKNOWN = new _PerformanceTagImpl('unknown');
+ static final _PerformanceTagImpl unknown = new _PerformanceTagImpl('unknown');
/**
* A list of all performance tags that have been created so far.
@@ -171,6 +177,11 @@ class _PerformanceTagImpl implements PerformanceTag {
String get label => userTag.label;
@override
+ PerformanceTag createChild(String childTagName) {
+ return new _PerformanceTagImpl('$label.$childTagName');
+ }
+
+ @override
PerformanceTag makeCurrent() {
if (identical(this, current)) {
return current;

Powered by Google App Engine
This is Rietveld 408576698