Uruchom test iPerf
Uruchamia test z konfigurowalnym serwerem, protokołem, kierunkiem i czasem. Typowy domyślny czas trwania w przepływie shortcuts wynosi 5 sekund.
Dokumentacja dla deweloperów
Automatyzuj sprawdzanie przepustowości, walidację punktów końcowych i zbieranie wyników za pomocą wbudowanych akcji i punktów końcowych wywołań zwrotnych.
iPerf3 Client & Server udostępnia dwie warstwy automatyzacji:
Używaj iperf3cs://x-callback-url/... dla automatyzacji opartej na wywołaniach zwrotnych.
Aktualne wymagania platformy Apple to iOS/iPadOS 16.6+, macOS 13.5+ i visionOS 1.0+.
Te akcje są dostępne bezpośrednio w aplikacji Apple Shortcuts:
Uruchamia test z konfigurowalnym serwerem, protokołem, kierunkiem i czasem. Typowy domyślny czas trwania w przepływie shortcuts wynosi 5 sekund.
Zwraca najnowszy ukończony wynik z lokalnej historii.
Sprawdza dostępność punktu końcowego przed pełnym uruchomieniem.
Zwraca skonfigurowane serwery dla automatyzacji sterowanej menu.
Runs a test and returns the result through the callback URLs.
| Parametr | Typ | Wymagany | Opis |
|---|---|---|---|
serverId | String | Nie | Saved server to use: host:port, a server UUID, or default. Omit it and the default server is used. |
serverName | String | Nie | Pick the server by its saved name instead of serverId. Takes precedence when both are present. |
autoAdd | Boolean | Nie | Create the server if it is not in the library yet. addServer is accepted as an alias. |
durationSec | Integer | Nie | Test length in seconds. Defaults to 5. |
protocol | String | Nie | tcp (default) or udp. |
direction | String | Nie | download, upload or bidirectional. |
streams | Integer | Nie | Parallel stream count. |
bandwidthMbps | Number | Nie | Target bandwidth for UDP tests, in Mbps. |
format | String | Nie | json (default) or text. |
x-success | String | Nie | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | Nie | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | Nie | Callback URL for a cancelled run. |
Returns the most recent saved result. Useful for periodic logging.
| Parametr | Typ | Wymagany | Opis |
|---|---|---|---|
serverId | String | Nie | Limit the lookup to one server: host:port, a UUID, or default. Omit it for the latest result overall. |
serverName | String | Nie | Same lookup by saved name. Takes precedence over serverId. |
format | String | Nie | json (default) or text. |
x-success | String | Nie | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | Nie | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | Nie | Callback URL for a cancelled run. |
Fetches a payload the app handed back as a reference. When a result is too large for a callback URL, the app returns <code>resultRef</code> instead of <code>result</code>, and this endpoint exchanges that reference for the full payload.
| Parametr | Typ | Wymagany | Opis |
|---|---|---|---|
resultRef | String | Tak | Reference returned earlier in place of result. |
format | String | Nie | json (default) or text. |
x-success | String | Nie | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | Nie | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | Nie | Callback URL for a cancelled run. |
iperf3cs://x-callback-url/run-test?serverId=iperf.example.com:5201&autoAdd=1&protocol=tcp&direction=download&durationSec=8&format=json&x-success=shortcuts://run-shortcut?name=StoreResult iperf3cs://x-callback-url/get-last-result?format=json&x-success=shortcuts://run-shortcut?name=PushSummary open "iperf3cs://x-callback-url/run-test?serverId=10.0.1.5:5201&protocol=udp&direction=bidirectional&durationSec=5" {
"success": true,
"startTime": "2026-08-21T09:42:02Z",
"endTime": "2026-08-21T09:42:10Z",
"duration": 8,
"receivedMegabitsPerSecond": 942.7,
"sentMegabitsPerSecond": 876.4,
"receivedBytes": 942700000,
"summaryText": "942.7 Mbps down, 876.4 Mbps up"
} Gdy akcja zawiedzie i obecny jest x-error, wywołanie zwrotne otrzymuje obiekt błędu.
| Kod | Opis |
|---|---|
| invalidParameter | A parameter is missing, malformed or out of range. |
| serverNotFound | No saved server matched the lookup, and autoAdd was not set. |
| networkUnavailable | The device has no usable network path to the endpoint. |
| connectionTimeout | The connection or the test exceeded its timeout. |
| testFailed | The test started and ended without a usable result. |
| cancelled | The run was cancelled before it finished. |
| requiresAppOpen | The action needs the app in the foreground. |
| unsupportedOnOSVersion | The action is not available on this OS version. |
{
"errorCode": "serverNotFound",
"errorMessage": "No saved server matches iperf.example.com:5201"
} Upewnij się, że adresy URL wywołania zwrotnego są zakodowane w URL, a schemat jest dozwolony na Twoim urządzeniu. Unikaj spacji lub niezakodowanych znaków specjalnych w wartościach zapytań.
Dla niezawodnego działania utrzymuj aplikację aktywną podczas trwania testu. Używaj planowania Shortcuts, aby wyzwalać uruchomienia o określonych porach.
Ustaw x-error przy każdym wywołaniu i rozgałęziaj po errorCode. Zacznij od krótkiego przebiegu durationSec=5: jeśli wróci serverNotFound lub connectionTimeout, długi test nie ma sensu.