Measure End User Response Times
Measure and analyze end user response times for transactions and actions on your app
Team avatar
Written by Team
Updated over a week ago

Apptim gives users the ability to instrument their apps by using custom events while running a test and measure end user response times. Apptim Events can be used in two different ways:

1. Single Events: A graphical identification of single timestamp in test results timeline (charts and videos).

This events can be useful to identify different user actions like taps or any similar action.

2. Time taken events: Measuring different event duration times during a test (using START | STOP flags)

Time taken events allow to measure the response time of any event, for example, the Login to the app, a screen transition or load time, from the end user perspective. It can also be used to split certain part of the test session, in order to be analyzed in more detailed or to be compared with a similar test, but run in a different app version.

To get more details on how to use Apptim Events and analyze end user response times, click and expand the video below:

How to enable Apptim Events for an Android app

Users can take advantage of this functionality by adding a single line of code in their Android app's code.

Single Mark (timestamp)

Add a log entry when the event happens:

Log.i("{APPTIM_EVENT}", "event-name")

Time taken per Event

Add a log entry both at the beginning and the end of an event:

Log.i("{APPTIM_EVENT}:", "event-name, START") 
...
Log.i("{APPTIM_EVENT}:", "event-name, STOP")

How to enable Apptim Events for an iOS app

Users can take advantage of this functionality by just logging events information using iOS syslog:

import os.log

Single Mark (timestamp)

Add a log entry when the event happens:

let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "apptim") 
os_log("{APPTIM_EVENT}: %{public}@", log: log, "event-name")

Time taken per Event

Add a log entry both at the beginning and the end of an event:

let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "apptim") 
os_log("{APPTIM_EVENT}: %{public}@", log: log, "event-name, START")
...
os_log("{APPTIM_EVENT}: %{public}@", log: log, "event-name, STOP")

General Considerations

Event naming

Besides {APPTIM_EVENT} flag that must be always in place, the event names can be any string without comma ,

Precision (ms)

All events will be stored with precision down to the millisecond relative to the test session start time.

Duplicate events in time-taken

When using START | STOP events, Apptim will assume that the first STOP corresponds with the first START of the same event-name to have a deterministic way of correlation.

For example, if the event sequence is the following:

Log.i("{APPTIM_EVENT}:", "Event A, START") // A1 sleep (10 ms) 
Log.i("{APPTIM_EVENT}:", "Event A, START") // A2 sleep (20 ms)
Log.i("{APPTIM_EVENT}:", "Event A, STOP") // A1 sleep (30 ms)
Log.i("{APPTIM_EVENT}:", "Event A, STOP") // A2

Apptim will assume that the first STOP corresponds with the first START of the same event-name, resulting in:

  • Event A(1) time taken: 30 ms

  • Event A(2) time taken: 50 ms

πŸ“’ To avoid this confusion you can always add ID's on event names.

Logs

All Apptim Events can be found at events.tsv file inside Logs section.


How to enable Apptim Events for a Flutter app

Use the dart function print as detailed below:

Single Mark (timestamp)

print("{APPTIM_EVENT}: event_name");

Time taken per Event

print("{APPTIM_EVENT}: event_name, START"); 
print("{APPTIM_EVENT}: event_name, STOP");


How to enable Apptim Events for a React Native app (Android only)

Use console.log function as detailed below:

Single Mark (timestamp)

console.log("{APPTIM_EVENT}: event_name"); 

Time taken per Event

console.log("{APPTIM_EVENT}: event_name, START"); 
console.log("{APPTIM_EVENT}: event_name, STOP");


How to enable for Xamarin Forms

Use Log.Info (Android) or System.Console.WriteLine (iOS) function as detailed below:

using Android.Util; 
Log.Info("{APPTIM_EVENT}", "productView, START");
Log.Info("{APPTIM_EVENT}", "productView, STOP");

System.Console.WriteLine("{APPTIM_EVENT}: productView, START"); System.Console.WriteLine("{APPTIM_EVENT}: productView, STOP");


Support

If you have any questions on how to enable and use Apptim Events, please contact our team at [email protected] and we'll help you get started.

Did this answer your question?