instance_performance_test ()
Function prototype | instance_performance_test (session, test_type, timestamp, upload_packet) |
---|---|
API Version | All |
SOAP, REST (from API Version 2.7.26) |
Returns statistics about server performance. This operation is only allowed if a valid session is provided (for security reasons) | |
Input parameters: |
|
Output parameters: |
|
Calculation formulas
The following formulas can be used to calculate communication performance:
Formula | test_type | upload_packet | Comments |
---|---|---|---|
latency = TotalTime - total_server_time | 0 (latency) | "" | In this mode the function does not receive nor return any packet of data, so the total communication time can be considered as the latency. |
uploadSpeed = sizeof(upload_packet) / (TotalTime - TotalServerTime - latency) | 0 (latency) | controlled size but array | Providing an upload_packet will allow to measure the communication time used to send a packet. In this case, the communication time consist of the latency and the upload time. |
downloadSpeed = sizeof(download_packet) / (TotalTime - TotalServerTime - latency) | 1 (download speed) | "" | In this mode the function does not receive any packet, but returns a packet of data of controlled size, so the total communication time consists of the latency and the download time. |
Request example
instance_performance_test ("LC5899bcff074af1.33078860", 7, 123312231, "")
Reponse
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API