-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
profiler.dart
27 lines (20 loc) · 922 Bytes
/
profiler.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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();