I using this curl request for sending data to API :
curl --location --request POST 'MY_IP' \
--header 'Content-Type: text/plain' \
--data-raw ' [{
"event_id": "123",
}]
'
I want to check the API performance by sending request asynchronously and measure the time take I tried to use xargs -P 10
which say send 10 request parallel but not able to do so ? Any help and how I can measure time ?
My Code :
#!/bin/bash
Body='{
"event_id": "12",
"metric_name": "API",
"value" : "1",
"dimensions": {
},
"timestamp_ms": 1615552313
}';
seq 1 2 | xargs -n1 -P10 curl --location --request POST '10.33.137.98:8080' --header 'Content-Type: text/plain' --data-raw "$Body"
But how to calculate time like P95 , P90 etc ?