Skip to content

Instantly share code, notes, and snippets.

@tarnacious
Last active March 31, 2016 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarnacious/c88d706d1bd478c5b246321cf3dac3cf to your computer and use it in GitHub Desktop.
Save tarnacious/c88d706d1bd478c5b246321cf3dac3cf to your computer and use it in GitHub Desktop.
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.33.10 (be patient)
Server Software: nginx/1.6.2
Server Hostname: 192.168.33.10
Server Port: 9100
Document Path: /
Document Length: 18 bytes
Concurrency Level: 10
Time taken for tests: 0.337 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 248000 bytes
HTML transferred: 18000 bytes
Requests per second: 2971.55 [#/sec] (mean)
Time per request: 3.365 [ms] (mean)
Time per request: 0.337 [ms] (mean, across all concurrent requests)
Transfer rate: 719.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.7 0 6
Processing: 1 3 0.9 3 17
Waiting: 1 3 0.8 3 17
Total: 2 3 1.2 3 17
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 5
95% 6
98% 7
99% 8
100% 17 (longest request)
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.33.10 (be patient)
Server Software: nginx/1.6.2
Server Hostname: 192.168.33.10
Server Port: 9000
Document Path: /
Document Length: 172 bytes
Concurrency Level: 10
Time taken for tests: 8.104 seconds
Complete requests: 1000
Failed requests: 731
(Connect: 0, Receive: 1, Length: 729, Exceptions: 1)
Non-2xx responses: 281
Total transferred: 268879 bytes
HTML transferred: 61438 bytes
Requests per second: 123.40 [#/sec] (mean)
Time per request: 81.040 [ms] (mean)
Time per request: 8.104 [ms] (mean, across all concurrent requests)
Transfer rate: 32.40 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 4
Processing: 1 81 46.1 75 254
Waiting: 0 79 46.8 73 254
Total: 1 81 46.1 75 255
Percentage of the requests served within a certain time (ms)
50% 75
66% 94
75% 109
80% 117
90% 146
95% 167
98% 192
99% 210
100% 255 (longest request)
#!/usr/bin/python
last_site = """
server {
listen %s default_server;
root /var/www/html;
index index.html
server_name *;
location / {
try_files $uri $uri/ =404;
}
}
"""
link_site = """
server {
listen %s default_server;
root /var/www/html;
index index.html
server_name *;
location / {
proxy_pass http://localhost:%s;
}
}
"""
start_port = 9000
end_port = 9100
path = "/etc/nginx/sites-enabled/"
for i in range(start_port, end_port):
with open(path + "link_%s" % (i,), "w") as f:
f.write(link_site % (i, i+1))
with open(path + "last_site", "w") as f:
f.write(last_site % (end_port))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment