Last active
November 25, 2018 00:54
-
-
Save IamTechknow/f25506e2715a371e8d5df3dbca953349 to your computer and use it in GitHub Desktop.
Stress test of local proxy server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stress test results: | |
npm run stress | |
> k6 run server/k6_test.js | |
/\ |‾‾| /‾‾/ /‾/ | |
/\ / \ | |_/ / / / | |
/ \/ \ | | / ‾‾\ | |
/ \ | |‾\ \ | (_) | | |
/ __________ \ |__| \__\ \___/ .io | |
execution: local | |
output: - | |
script: server/k6_test.js | |
duration: 20s, iterations: - | |
vus: 1000, max: 1000 | |
done [==========================================================] 20s / 20s | |
data_received..............: 32 MB 1.6 MB/s | |
data_sent..................: 1.6 MB 78 kB/s | |
http_req_blocked...........: avg=4.37ms min=0s med=0s max=522.35ms p(90)=0s p(95)=0s | |
http_req_connecting........: avg=4.35ms min=0s med=0s max=522.35ms p(90)=0s p(95)=0s | |
http_req_duration..........: avg=22.53ms min=0s med=995.5µs max=544.36ms p(90)=4ms p(95)=230.15ms | |
http_req_receiving.........: avg=101.5µs min=0s med=0s max=18.01ms p(90)=0s p(95)=996.8µs | |
http_req_sending...........: avg=44.97µs min=0s med=0s max=40.02ms p(90)=0s p(95)=0s | |
http_req_tls_handshaking...: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s | |
http_req_waiting...........: avg=22.39ms min=0s med=0s max=544.36ms p(90)=4ms p(95)=230.15ms | |
http_reqs..................: 19153 957.628142/s | |
iteration_duration.........: avg=1.07s min=1s med=1.01s max=2.73s p(90)=1.07s p(95)=1.34s | |
iterations.................: 18157 907.829279/s | |
vus........................: 1000 min=1000 max=1000 | |
vus_max....................: 1000 min=1000 max=1000 | |
Stress test script: | |
import http from "k6/http"; | |
import { sleep } from "k6"; | |
export let options = { | |
vus: 1000, | |
duration: "20s", | |
rps: 1000 | |
}; | |
export default function () { | |
http.get("http://localhost:3000/15000/"); | |
sleep(1); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment