sudo rm -rf /var/www/html/index.html sudo vim /var/www/html/index.html
javascript
<html> <body> <h1>Hello FIT5225</h1> <p>This page is hosted on my Nectar VM.</p> </body> </html>
javascript
ab -c 100 -n 20000 -k http://localhost/
javascript
pip3 install locust
python
from locust import HttpUser, task
class InternetUser(HttpUser): @task def index(self): self.client.get("/")
python
locust
python
http://localhost:8089
python
http://<你的实例IP>
plain text
Requests per second: 10032.49 [#/sec] (mean)
plain text
Time taken for tests: 1.994 seconds
plain text
Time per request: 9.968 [ms] (mean)
Time per request: 0.100 [ms] (mean, across all concurrent requests)
plain text
Transfer rate: 3913.48 [Kbytes/sec] received
plain text
Connect: min 0 mean 0 median 0 max 7
Processing: min 0 mean 10 median 2 max 556
Waiting: min 0 mean 10 median 2 max 556
Total: min 0 mean 10 median 2 max 559