Ir a la consola

Trace

public class Trace extends Object
implements Parcelable

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

Constant Summary

int MAX_ATTRIBUTE_KEY_LENGTH Maximum allowed length of the Key of the Trace attribute
int MAX_ATTRIBUTE_VALUE_LENGTH Maximum allowed length of the Value of the Trace attribute
int MAX_TRACE_CUSTOM_ATTRIBUTES Maximum allowed number of attributes allowed in a trace.
int MAX_TRACE_NAME_LENGTH Maximum allowed length of the name of the Trace

Inherited Constant Summary

Field Summary

public static final Creator<Trace> CREATOR A public static CREATOR field that implements Parcelable.Creator and generates instances of your Parcelable class from a Parcel.

Public Method Summary

int
describeContents()
Describes the kinds of special objects contained in this Parcelable's marshalled representation.
String
getAttribute(String attribute)
Returns the value of an attribute.
Map<StringString>
getAttributes()
Returns the map of all the attributes added to this trace.
long
getLongMetric(String metricName)
Gets the value of the metric with the given name in the current trace.
void
incrementMetric(String metricName, long incrementBy)
Atomically increments the metric with the given name in this trace by the incrementBy value.
void
putAttribute(String attribute, String value)
Sets a String value for the specified attribute.
void
putMetric(String metricName, long value)
Sets the value of the metric with the given name in this trace to the value provided.
void
removeAttribute(String attribute)
Removes an already added attribute from the Traces.
void
start()
Starts this trace.
void
stop()
Stops this trace.
void
writeToParcel(Parcel out, int flags)
Flatten this object into a Parcel.

Inherited Method Summary

Constants

public static final int MAX_ATTRIBUTE_KEY_LENGTH

Maximum allowed length of the Key of the Trace attribute

Constant Value: 40

public static final int MAX_ATTRIBUTE_VALUE_LENGTH

Maximum allowed length of the Value of the Trace attribute

Constant Value: 100

public static final int MAX_TRACE_CUSTOM_ATTRIBUTES

Maximum allowed number of attributes allowed in a trace.

Constant Value: 5

public static final int MAX_TRACE_NAME_LENGTH

Maximum allowed length of the name of the Trace

Constant Value: 100

Fields</