PerformanceKt

public final class PerformanceKt


Summary

Public fields

final @NonNull FirebasePerformance

Accessing this object for Kotlin apps has changed; see the migration guide.

Public methods

static final void
PerformanceKt.trace(
    @NonNull HttpMetric receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull HttpMetricUnit> block
)

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

static final @NonNull T
<T extends Object> PerformanceKt.trace(
    @NonNull Trace receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull Trace, @NonNull T> block
)

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

static final @NonNull T
<T extends Object> trace(
    @NonNull String name,
    @ExtensionFunctionType @NonNull Function1<@NonNull Trace, @NonNull T> block
)

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Public fields

performance

public final @NonNull FirebasePerformance performance

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebasePerformance instance of the default FirebaseApp.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-perf-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

Public methods

PerformanceKt.trace

public static final void PerformanceKt.trace(
    @NonNull HttpMetric receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull HttpMetricUnit> block
)

Measures the time it takes to run the block wrapped by calls to start and stop using HttpMetric.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-perf-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

PerformanceKt.trace

public static final @NonNull T <T extends Object> PerformanceKt.trace(
    @NonNull Trace receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull Trace, @NonNull T> block
)

Measures the time it takes to run the block wrapped by calls to start and stop using Trace.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-perf-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

trace

public static final @NonNull T <T extends Object> trace(
    @NonNull String name,
    @ExtensionFunctionType @NonNull Function1<@NonNull Trace, @NonNull T> block
)

Creates a Trace object with given name and measures the time it takes to run the block wrapped by calls to start and stop.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-perf-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.