Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
io.flutter.util.TraceSection Class Reference
Inheritance diagram for io.flutter.util.TraceSection:

Public Member Functions

void close ()
 

Static Public Member Functions

static TraceSection scoped (String name)
 
static void begin (@NonNull String sectionName)
 
static void end () throws RuntimeException
 
static void beginAsyncSection (String sectionName, int cookie)
 
static void endAsyncSection (String sectionName, int cookie)
 

Detailed Description

Definition at line 10 of file TraceSection.java.

Member Function Documentation

◆ begin()

static void io.flutter.util.TraceSection.begin ( @NonNull String  sectionName)
inlinestatic

Wraps Trace.beginSection to ensure that the line length stays below 127 code units.

Parameters
sectionNameThe string to display as the section name in the trace.

Definition at line 45 of file TraceSection.java.

45 {
46 Trace.beginSection(cropSectionName(sectionName));
47 }

◆ beginAsyncSection()

static void io.flutter.util.TraceSection.beginAsyncSection ( String  sectionName,
int  cookie 
)
inlinestatic

Wraps Trace.beginAsyncSection to ensure that the line length stays below 127 code units.

Parameters
sectionNameThe string to display as the section name in the trace.
cookieUnique integer defining the section.

Definition at line 60 of file TraceSection.java.

60 {
61 Trace.beginAsyncSection(cropSectionName(sectionName), cookie);
62 }

◆ close()

void io.flutter.util.TraceSection.close ( )
inline

Definition at line 32 of file TraceSection.java.

32 {
33 end();
34 }

◆ end()

static void io.flutter.util.TraceSection.end ( ) throws RuntimeException
inlinestatic

Wraps Trace.endSection.

Definition at line 50 of file TraceSection.java.

50 {
51 Trace.endSection();
52 }

◆ endAsyncSection()

static void io.flutter.util.TraceSection.endAsyncSection ( String  sectionName,
int  cookie 
)
inlinestatic

Wraps Trace.endAsyncSection to ensure that the line length stays below 127 code units.

Definition at line 65 of file TraceSection.java.

65 {
66 Trace.endAsyncSection(cropSectionName(sectionName), cookie);
67 }

◆ scoped()

static TraceSection io.flutter.util.TraceSection.scoped ( String  name)
inlinestatic

Factory used to support the try-with-resource construct.

To get scoped trace events, use the try-with-resource construct, for instance:


try (TraceSection e = TraceSection.scoped("MyTraceEvent")) {
// code.
}

Definition at line 22 of file TraceSection.java.

22 {
23 return new TraceSection(name);
24 }
const char * name
Definition fuchsia.cc:50

The documentation for this class was generated from the following file: