Measuring Performance

The SDK provides methods to perform a TCP Ping and extended Speedtest to measure the performance of locations.

Pinging Locations

A TCP Ping will measure the time of establishing a TCP connection to an endpoint. We are not using regular ICMP pings as these type of pings are many times blocked in several networks.

ping_locations

This method will perform a single ping per instance per location and will then calculate the average ping for that location,

Parameters

Name
Type
Description

subscription_id

String

ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID

callback

This callback interface needs to be implemented by the app, to receive updates while the test is being conducted

Returns

Returns an array of LocationRatingResult where only the ping_rating is populated.

Speed Test

The speed test is an extended form of what the Smart Location algorithm is doing. It first pings all locations to determine the best endpoint which in the next step should be used to perform an HTTP up- and download test. Compared to the Smart Location algorithmn, it takes much more time, as the number of pings and the time to perform the up- and download is 10 seconds each. The reason for using a fixed time is, to have stable results independent of the capacity of the connection.

execute_speedtest

This will start a speedtest and will return, once the results have been fetched.

Parameters

Name
Type
Description

subscription_id

String

ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID

endpoint_selection_mode

SpeedTestEndpointSelectionMode

callback

This callback interface needs to be implemented by the app, to receive updates while the test is being conducted.

Returns

Returns an array of LocationRatingResult where only the ping_rating is populated.

Callback Notification Flow

While executing the speed test, you will encounter various callback types:

  1. Initially, you will receive several progress types labeled ping as the speed test identifies the optimal server. This process may take a few seconds.

  2. Once the final server instance for the speed test is selected, you will receive a progress type of SpeedTestInstanceSelected. This notification will also provide details on Jitter, Latency, and Packet Loss as part of the results.

  3. Subsequently, you will receive multiple progress types labeled SpeedTestDownload/SpeedTestUpload, which will inform you of the current down- or upload speed and progress.

Last updated