dart-sdk/sdk/lib/developer/profiler.dart
Ben Konyi 7767f9d9a6 [ dart:developer ] Apply class modifiers to dart:developer classes
None of the classes in dart:developer should be implemented or extended
as most functionality requires native calls into the VM.

TEST=N/A

CoreLibraryReviewExempt: No functional changes to implementations.
Change-Id: I6a8b819e8c9c771954009ffbb2e31f6d0f368c57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288823
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-22 15:34:59 +00:00

28 lines
922 B
Dart

// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of dart.developer;
/// A UserTag can be used to group samples in the
/// [DevTools CPU profiler](https://flutter.dev/docs/development/tools/devtools/cpu-profiler).
abstract final class UserTag {
/// The maximum number of UserTag instances that can be created by a program.
static const maxUserTags = 64;
external factory UserTag(String label);
/// Label of [this].
String get label;
/// Make [this] the current tag for the isolate. Returns the current tag
/// before setting.
UserTag makeCurrent();
/// The default [UserTag] with label 'Default'.
external static UserTag get defaultTag;
}
/// Returns the current [UserTag] for the isolate.
external UserTag getCurrentTag();