public class

Trace

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.firebase.perf.metrics.Trace

Class Overview

Trace allows you to set beginning and end of a certain action in your app.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Trace> CREATOR A public static CREATOR field that implements the Parcelable.Creator interface, generates instances of your Parcelable class from a Parcel.
Public Methods
int describeContents()
Describes the kinds of special objects contained in this Parcelable's marshalled representation.
void incrementCounter(String counterName, long incrementBy)
Increments the counter in this trace with the given name by given value.
void incrementCounter(String counterName)
Increments the counter in this trace with the given name by one.
void start()
Starts this trace.
void stop()
Stops this trace.
void writeToParcel(Parcel out, int flags)
Flatten this object into a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<Trace> CREATOR

A public static CREATOR field that implements the Parcelable.Creator interface, generates instances of your Parcelable class from a Parcel. Please refer to https://developer.android.com/reference/android/os/Parcelable.html

Public Methods

public int describeContents ()

Describes the kinds of special objects contained in this Parcelable's marshalled representation. Please refer to https://developer.android.com/reference/android/os/Parcelable.html

Returns
int always returns 0.

public void incrementCounter (String counterName, long incrementBy)

Increments the counter in this trace with the given name by given value. If a counter does not already exist, a new one will be created.

Parameters
counterName String: Name of the counter to be incremented. Requires no leading or trailing whitespace, no leading underscore '_' character, max length is 32 characters.
incrementBy long: Amount by which the counter has to be incremented.

public void incrementCounter (String counterName)

Increments the counter in this trace with the given name by one. If a counter does not already exist, a new one will be created.

Parameters
counterName String: Name of the counter to be incremented. Requires no leading or trailing whitespace, no leading underscore '_' character, max length is 32 characters.

public void start ()

Starts this trace.

public void stop ()

Stops this trace.

public void writeToParcel (Parcel out, int flags)

Flatten this object into a Parcel. Please refer to https://developer.android.com/reference/android/os/Parcelable.html

Parameters
out Parcel: the Parcel in which the object should be written.
flags int: always will be the value 0.