Comments (4)
Well, I'm not all that familiar with python
and requests
library, but it seems like when you perform a single request, time to establish TCP connection, do a DNS lookup, etc. is much larger than the time to perform a single request (this is what you do with python
). While with bombardier, by default, you establish something like 125 TCP connections, which are reused, and perform as many requests as you can in 10 seconds — 63013 in your case. With this setup, time to establish TCP connections (etc.) becomes negligible compared to the total time spent performing requests and therefore you get the results that you are seeing.
You should probably get something close to your python
's results if you use bombardier -n 1 <url>
.
from bombardier.
bom 1.8ms
requests 286ms
root@ubuntu-HP-ProDesk-680-G2-MT:~/software# ./bombardier-linux-amd64 -n 1 http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29&qid=123
[1] 15519
root@ubuntu-HP-ProDesk-680-G2-MT:~/software# Bombarding http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29 with 1 requests using 125 connections
1 / 1 [========================================================================================================================================================] 100.00% 0s
Done!
Statistics Avg Stdev Max
Reqs/sec 135.49 95.80 270.97
Latency 1.80ms 1.27ms 3.60ms
HTTP codes:
1xx - 0, 2xx - 1, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 88.94KB/s
[1]+ Done ./bombardier-linux-amd64 -n 1 http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29
root@ubuntu-HP-ProDesk-680-G2-MT:~/software#
root@ubuntu-HP-ProDesk-680-G2-MT:~/software#
root@ubuntu-HP-ProDesk-680-G2-MT:~/software# python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> def func():
... import time
... t= time.time()
... requests.get("http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29&qid=123")
... print time.time() -t
...
>>> func()
0.286794900894
>>>
from bombardier.
I just noticed that you forgot to double-quote URL for bombardier, i.e. you type:
./bombardier-linux-amd64 -n 1 http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29&qid=123
, but it should be:
./bombardier-linux-amd64 -n 1 "http://10.209.5.34:8013/hotrizon/get-score?m2=0000090ecb899d858576495c70f27a29&qid=123"
Might not be the reason for the different results, but you test two different URLs.
from bombardier.
Finally, I found this problem. Thanks!
from bombardier.
Related Issues (20)
- Odd redirects caused by bombardier appending the default port to the request URLs, when the original URL for testing had none HOT 3
- Another user previously encountered similar issue in #21. In short, currently you'll have to craft the body yourself.
- For some servers wall time significantly exceeds the expected duration of the test when fasthttp client is used HOT 3
- Bug when using more than one query parameter HOT 1
- can't pass trivy scan HOT 1
- Feature Request: Validate Responses
- Report stats during the test
- Can the stress test of random parameters be realized? HOT 1
- 'http2: no cached connection was available' when receiving goAway frame during load test
- Can the stress test using different parameters within on testflow HOT 3
- body not allowed for GET HOT 1
- new release tag? HOT 2
- Unable to connect with h2c - HTTP/2 clear text protocol HOT 1
- Implement min HOT 1
- bombardier version unspecified HOT 2
- Option to save response of the request HOT 6
- How can I send a basic post request with headers and a json body? HOT 1
- incorrect computation of stddev? HOT 1
- missing windows arm64 build product HOT 1
- auto calculated boundary in large file uploading in asp.net core and testing with bombardier HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bombardier.