template <typename Delegate>

class Scope

Defined at line 83 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

RAII type representing a scope to trace with an FXT complete duration event. Stores and executes

delegates created by FXT_BEGIN_SCOPE and FXT_END_SCOPE to capture arguments and emit trace events

when tracing is enabled.

Public Methods

template <typename Capture>
void Scope<Delegate> (ScopeBegin<Capture> && begin)

Constructs a Scope with the given capture delegate. The delegate should be created by

FXT_BEGIN_SCOPE(...) or a suitable wrapper macro.

Defined at line 88 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

void ~Scope<Delegate> ()

The Scope ends automatically if it is not explicitly ended earlier.

Defined at line 91 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

void Scope<Delegate> (const Scope<Delegate> & )

No copy or move.

Defined at line 94 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

Scope<Delegate> & operator= (const Scope<Delegate> & )

Defined at line 95 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

void Scope<Delegate> (Scope<Delegate> && )

Defined at line 96 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

Scope<Delegate> & operator= (Scope<Delegate> && )

Defined at line 97 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

template <typename Capture>
Scope<Delegate> & operator= (ScopeEnd<Capture> && end)

Ends the Scope early with the given capture delegate to include additional arguments. The

delegate should be created by FXT_END_SCOPE(...) or a suitable wrapper macro.

TODO(https://fxbug.dev/42071611): Get consensus on ergonomic syntax for ending a scope with arguments.

Defined at line 103 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

void End ()

Ends the Scope early without additional arguments.

Defined at line 112 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h

auto Completer ()

Returns a callable to end this Scope. This is useful to delegate ending the Scope to a callee

within same lexical scope. The lifetime of this instance must not end before the completer is

invoked.

Defined at line 119 of file ../../src/performance/lib/fxt/include/lib/fxt/trace_base.h