All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosMain.dev.gitlive.firebase.perf.metrics.Trace.kt Maven / Gradle / Ivy

package dev.gitlive.firebase.perf.metrics

import cocoapods.FirebasePerformance.FIRTrace

public val Trace.ios: FIRTrace? get() = ios

public actual class Trace internal constructor(internal val ios: FIRTrace?) {

    public actual fun start() {
        ios?.start()
    }

    public actual fun stop() {
        ios?.stop()
    }

    public actual fun getLongMetric(metricName: String): Long = ios?.valueForIntMetric(metricName) ?: 0L

    public actual fun incrementMetric(metricName: String, incrementBy: Long) {
        ios?.incrementMetric(metricName, incrementBy)
    }

    public actual fun putMetric(metricName: String, value: Long) {
        ios?.setIntValue(value, metricName)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy