Class: Ottrelite

@ottrelite/core.Ottrelite

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Ottrelite()

Properties

wasInstallCalled

Static Private wasInstallCalled: boolean = false

Methods

beginAsyncEvent

Static beginAsyncEvent(eventName, additionalArgs?): number

Begins tracing a new event using the asynchronous API (allowing multiple events with the same name simultaneously).

Parameters

NameTypeDescription
eventNamestringThe name of the event to begin
additionalArgs?Record<string, string>Optional map of additional event metadata

Returns

number

Token assigned to this trace entry, required to end this event


beginEvent

Static beginEvent(eventName, additionalArgs?): void

Begins tracing a new event using the synchronous API. Needs to have a matching invocation of endEvent() to close the event.

Parameters

NameTypeDescription
eventNamestringThe name of the event to begin
additionalArgs?Record<string, string>Optional map of additional event metadata

Returns

void


counterEvent

Static counterEvent(eventName, value): void

Registers a counter event with a given value.

Parameters

NameTypeDescription
eventNamestringThe name of the event
valuenumberThe numerical value of the counter event

Returns

void


endAsyncEvent

Static endAsyncEvent(eventName, token, additionalArgs?): void

Ends tracing a previously started event in a given frame using the asynchronous API.

Parameters

NameTypeDescription
eventNamestringThe name of the event to begin
tokennumberToken returned by beginAsyncEvent
additionalArgs?Record<string, string>Optional map of additional event metadata

Returns

void


endEvent

Static endEvent(additionalArgs?): void

Ends tracing a previously started event in a given frame using the synchronous API.

Parameters

NameType
additionalArgs?Record<string, string>

Returns

void


getJsStackTrace

Static Private getJsStackTrace(): StackTraceEntry[]

Returns

StackTraceEntry[]


install

Static install(backends?, options?): void

Used to register the backends you want to use in your application. You can pass an array of backend classes to this function, and it will initialize them, making all invocations to the core API be passed to the backends that support them.

Not all backends support all API calls; sometimes the support level may depend on e.g. the minimum Android API level targeted by your application (which is the case for the ATrace backend) - please consult the README.md files of the individual backends for detailed information.

Parameters

NameTypeDefault valueDescription
backendsOttreliteBackend[][]Array of backend classes to register; these classes are pure imports from the individual backend packages.
optionsOttreliteOptions{}Optional configuration.

Returns

void


listInstalledBackends

Static listInstalledBackends(): OttreliteBackendInfo[]

Returns detailed information about the currently-installed backends.

Returns

OttreliteBackendInfo[]

List of details of installed backends


safelyIterateBackendsList

Static Private safelyIterateBackendsList(backends, callback): void

Parameters

NameType
backendsOttreliteBackend[]
callback(backend: OttreliteBackend) => void

Returns

void

Need to boost your app's performance?
We help React Native teams enhance speed, responsiveness, and efficiency.