AsyncProfiler class

AsyncProfiler profiles an async function. Reports the elapsed wall-clock duration for each async yield by tracking the entry/exit of this custom zone

Constructors

AsyncProfiler({int stackDepth = _defaultStackDepth})
AsyncProfiler, optional stackDepth is how many stack frames before the current frame to report

Properties

defaultZoneSpec ZoneSpecification
Default Zone Specs binds this.registerCallback to the ZoneSpecification.registerCallback
read-only
elapsedMS int
Milliseconds since profile started
read-only
frames List<StackFrame>
read-only
hashCode int
The hash code for this object.
read-onlyinherited
profileResults String
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
stackDepth int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
profile<T>(T f(), {ZoneSpecification zoneSpec}) → T
Profile the provided function. Accepts optional ZoneSpecification or use the defaultZoneSpec
registerCallback<R>(Zone self, ZoneDelegate parent, Zone zone, R f()) ZoneCallback<R>
registerCallback Handler to profile registerCallback zone events
registerUnaryCallback<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg)) ZoneUnaryCallback<R, T>
registerUnaryCallback Handler to profile registerUnaryCallback zone events
runHandler<R>(Zone self, ZoneDelegate parent, Zone zone, R f()) → R
runHandler Handler to profile runHandler zone events
runHandlerBinary<R, T, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T t, T2 t2), T arg, T2 arg2) → R
runHandlerBinary Handler to profile runHandlerBinary zone events
runHandlerUnary<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T t), T arg) → R
runHandlerUnary Handler to profile runHandlerUnary zone events
scheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, void f()) → void
scheduleMicrotask Handler to profile scheduleMicrotask zone events
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited