Skip to content

Performance

Francisco Dias edited this page Aug 23, 2024 · 4 revisions

Performance Monitoring

Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your Apple, Android, and web apps. You use the Performance Monitoring SDK to collect performance data from your app, then review and analyze that data in the Firebase console. Performance Monitoring helps you to understand in real time where the performance of your app can be improved so that you can use that information to fix performance issues.

General Functions

These functions are provided for general interaction with the extension:

HTTP Metric Functions

Metric is used to collect data for network requests/responses. A new object must be used for every request/response.

Trace Functions

Trace allows you to set beginning and end of a certain action in your app. This will allow you to measure performance of tasks.



Back To Top

FirebasePerformance_isPerformanceCollectionEnabled

This function returns whether performance monitoring is enabled or disabled. This respects the Firebase Performance specific values first, and if these aren't set, uses the Firebase wide data collection switch.


Syntax:

FirebasePerformance_isPerformanceCollectionEnabled()



Returns:

Boolean


Example:

FirebasePerformance_setPerformanceCollectionEnabled(!FirebasePerformance_isPerformanceCollectionEnabled());

The above code shows a code example.




Back To Top

FirebasePerformance_setPerformanceCollectionEnabled

This function enables or disables performance monitoring. This setting is persisted and applied on future invocations of your application. By default, performance monitoring is enabled.

To disable performance monitoring before of start the app in the extension injection change firebase_performance_collection_enabled to false.


Syntax:

FirebasePerformance_setPerformanceCollectionEnabled(enabled)
Argument Type Description
enabled Boolean Should performance monitoring be enabled



Returns:

N/A


Example:

FirebasePerformance_setPerformanceCollectionEnabled(!FirebasePerformance_isPerformanceCollectionEnabled());

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Attribute_Get

This function returns the value of an attribute.

Note

this function is only available in Android.


Syntax:

FirebasePerformance_HttpMetric_Attribute_Get(name, attribute)
Argument Type Description
name String HttpMetric name
attribute String Attribute name



Returns:

String


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html")//, application/json, etc...
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Attribute_GetAll

This function returns all attributes in JSON format.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_HttpMetric_Attribute_GetAll(name, attribute)
Argument Type Description
name String HttpMetric name
attribute String Attribute name



Returns:

String


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc...
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Attribute_Put

This function sets a String value for the specified attribute. Updates the value of the attribute if the attribute already exists.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_HttpMetric_Attribute_Put(name, attribute, value)
Argument Type Description
name String HttpMetric name
attribute String Attribute name
value String Value of the attribute



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Attribute_Remove

This function removes an already added attribute from the HttpMetric.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_HttpMetric_Attribute_Remove(name, attribute)
Argument Type Description
name String HttpMetric name
attribute String Attribute name



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Create

This function creates a HttpMetric object for collecting network performance data for one request/response.


Syntax:

FirebasePerformance_HttpMetric_Create(name, url, method)
Argument Type Description
name String HttpMetric name
url String a valid url String, cannot be empty
method String One of the values GET, PUT, POST, DELETE, HEAD, PATCH, OPTIONS, TRACE, or CONNECT



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_SetHttpResponseCode

This function sets the HTTP response code of the request.


Syntax:

FirebasePerformance_HttpMetric_SetHttpResponseCode(name, responseCode)
Argument Type Description
name String HttpMetric name
responseCode Real valid values are greater than 0



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_SetRequestPayloadSize

This function sets the size of the request payload.


Syntax:

FirebasePerformance_HttpMetric_SetRequestPayloadSize(arg)
Argument Type Description
arg Real The argument to be passed in



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_SetResponseContentType

This function sets the content type of the response such as text/html, application/json, etc.


Syntax:

FirebasePerformance_HttpMetric_SetResponseContentType(name, contentType)
Argument Type Description
name String HttpMetric Name
contentType String valid string of MIME type. Invalid usage will be logged.



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_SetResponsePayloadSize

This function sets the size of the response payload.


Syntax:

FirebasePerformance_HttpMetric_SetResponsePayloadSize(name, bytes)
Argument Type Description
name String HttpMetric name
bytes String Valid values are greater than or equal to 0. Invalid usage will be logged.



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Start

This function marks the start time of the request.


Syntax:

FirebasePerformance_HttpMetric_Start(name)
Argument Type Description
name String HttpMetric name



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET")
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_HttpMetric_Stop

This function marks the end time of the response and queues the network request metric on the device for transmission. Check logcat for transmission info.


Syntax:

FirebasePerformance_HttpMetric_Stop(name)
Argument Type Description
name String HttpMetric name



Returns:

N/A


Example:

FirebasePerformance_HttpMetric_Create(httpMetric,"gamemaker.io","GET");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key1","value1");
FirebasePerformance_HttpMetric_Attribute_Put(httpMetric,"key2","value2");
show_debug_message(FirebasePerformance_HttpMetric_Attribute_Get(httpMetric));
FirebasePerformance_HttpMetric_SetRequestPayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetResponseContentType(httpMetric,"text/html");//, application/json, etc.
FirebasePerformance_HttpMetric_SetResponsePayloadSize(httpMetric,100);
FirebasePerformance_HttpMetric_SetHttpResponseCode(httpMetric,200);
FirebasePerformance_HttpMetric_Start(httpMetric);

//After some time
FirebasePerformance_HttpMetric_Stop(httpMetric);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Attribute_GetAll

This function returns the map of all the attributes added to this trace.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_Trace_Attribute_GetAll(name)
Argument Type Description
name String Trace name



Returns:

String


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Attribute_Put

This function sets a String value for the specified attribute.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_Trace_Attribute_Put(name, attribute, value)
Argument Type Description
name String Trace name
attribute String Attribute name
value String Value of the attribute



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Attribute_Remove

This function removes an already added attribute from the Traces. If the trace has been stopped, this method returns without removing the attribute.

Note

This function is only available in Android.


Syntax:

FirebasePerformance_Trace_Attribute_Remove(name, attribute)
Argument Type Description
name String Trace name
attribute String Name of the attribute to be removed from the running Traces.



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Create

This function creates a Trace object with given name.


Syntax:

FirebasePerformance_Trace_Create(name)
Argument Type Description
name String Trace name



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Metric_GetLong

This function gets the value of the metric with the given name in the current trace. If a metric with the given name doesn't exist, it is NOT created and a 0 is returned. This method is atomic.


Syntax:

FirebasePerformance_Trace_Metric_GetLong(name, metric)
Argument Type Description
name String Trace name
metric String Metric name



Returns:

Real


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Metric_Increment

This function atomically increments the metric with the given name in this trace by the incrementBy value. If the metric does not exist, a new one will be created. If the trace has not been started or has already been stopped, returns immediately without taking action.


Syntax:

FirebasePerformance_Trace_Metric_Increment(name, metric, value)
Argument Type Description
name String Trace name
metric String Metric name
value String Amount by which the metric has to be incremented.



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Metric_Put

This function sets the value of the metric with the given name in this trace to the value provided. If a metric with the given name doesn't exist, a new one will be created. If the trace has not been started or has already been stopped, returns immediately without taking action. This method is atomic.


Syntax:

FirebasePerformance_Trace_Metric_Put(name, metric, value)
Argument Type Description
name String Trace name
metric String Metric name
value String The value to which the metric should be set to.



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Start

This function starts the trace.


Syntax:

FirebasePerformance_Trace_Start(name)
Argument Type Description
name String The trace name



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.




Back To Top

FirebasePerformance_Trace_Stop

This function stops the trace with the given name.


Syntax:

FirebasePerformance_Trace_Stop(name)
Argument Type Description
name String Trace name



Returns:

N/A


Example:

FirebasePerformance_Trace_Create(TraceName);
FirebasePerformance_Trace_Attribute_Put(TraceName,"key1","value1");
FirebasePerformance_Trace_Attribute_Put(TraceName,"key2","value2");
show_debug_message(FirebasePerformance_Trace_Attribute_Get(TraceName,"key1"));
show_debug_message(FirebasePerformance_Trace_Attribute_GetAll(TraceName));
FirebasePerformance_Trace_Metric_Put(TraceName,"key3",10);
FirebasePerformance_Trace_Metric_Increment(TraceName,"key3",1);
show_debug_message(FirebasePerformance_Trace_Metric_GetLong(TraceName,"key3"));
FirebasePerformance_Trace_Start(TraceName);

//After some time...
FirebasePerformance_Trace_Stop(TraceName);

The above code shows a code example.



Clone this wiki locally