codesenberg / bombardier Goto Github PK
View Code? Open in Web Editor NEWFast cross-platform HTTP benchmarking tool written in Go
License: MIT License
Fast cross-platform HTTP benchmarking tool written in Go
License: MIT License
Not entirely sure that this is the fault of bombardier. Could easily be more relevant to fasthttp
or MacOS networking.
This same error did not occur when a similar server was built using net/http
. The net
server provided results as expected in the browser.
5e387c23434f632213c1039d5f0ada93d6153f1e
darwin/amd64
macOS 10.15.5 (Catalina)
Go version: go version go1.13.7 darwin/amd64
Run package containing:
package main
import (
"fmt"
"net"
)
func main() {
l, err := net.Listen("tcp", ":8081")
if err != nil {
panic(err)
}
for {
conn, err := l.Accept()
if err != nil {
fmt.Println(err)
continue
}
go handleConn(conn)
}
}
func handleConn(c net.Conn) {
defer c.Close()
c.Write([]byte(`HTTP/1.1 200 OK
Content-Length: 50
Information about your request:
URL: /
Method: GET
`))
}
Then run command;
bombardier -l localhost:8081
Some results to be printed to console.
System kernel panic. Upon system restart, received error beginning with:
panic(cpu 0 caller 0xffffff801cac2c5f): assertion failed: NETNS_REF_COUNT(res, flags) != 0, file: /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.121.2/bsd/skywalk/namespace/netns.c, line: 830
Using the 95th percentile is common among performance measurements. This feature will allow bombardier to output the 95th percentile within the latency statistics and json output.
Example of latency statistics:
# ./bombardier -n 100 -c 1 http://www.google.ca -l
Statistics Avg Stdev Max
Reqs/sec 12.58 67.10 1470.52
Latency 100.21ms 130.73ms 1.21s
Latency Distribution
50% 75.40ms
75% 79.78ms
90% 96.40ms
95% 148.84ms
99% 577.28ms
HTTP codes:
1xx - 0, 2xx - 100, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 122.63KB/s
Example of JSON output:
# ./bombardier -n 100 -c 1 http://www.google.ca -o j
{
"spec": {
"numberOfConnections": 1,
"testType": "number-of-requests",
"numberOfRequests": 100,
"method": "GET",
"url": "http://www.google.ca",
"body": "",
"stream": false,
"timeoutSeconds": 2,
"client": "fasthttp"
},
"result": {
"bytesRead": 1251011,
"bytesWritten": 6222,
"timeTakenSeconds": 21.252998768,
"req1xx": 0,
"req2xx": 100,
"req3xx": 0,
"req4xx": 0,
"req5xx": 0,
"others": 0,
"latency": {
"mean": 212518.7,
"stddev": 1167030.4331027067,
"max": 11809446
},
"rps": {
"mean": 4.829551616738988,
"stddev": 14.50170391245913,
"max": 116.41387974748899,
"percentiles": {
"50": 0,
"75": 0,
"90": 0,
"95": 49.924945,
"99": 58.68506
}
}
}
}
I build bombardier from source using go1.10.1 darwin/amd64
. I also cross compiled to linux/amd64
.
db65d7c4537354aabece20b1fbd0127f51145f11
linux/amd64
& darwin/amd64
I noticed requests failing when using the --http1 flag, so I used requestbin
to log and inspect requests. Turns out that anything passed in via both the --body
and --body-file
flags gets ignored for --http1
and --http2
flags. I verified this by removing those flags and the requests passed through properly.
I expect the body to be passed through in post requests when not utilizing fast-http
The body parameters weren't passed through.
P.S. Thanks for creating this awesome tool.
can't bypass https when the https certificate is issued by an unknown authority(self generated).
Could you include an example where you use http headers ?
Tried to set with the following
bombardier -c 2 -d 2s -H 'Content-Type: application/json' -data '{"key": "value"}' -m POST http://localhost:5001
but when I examined the target I'm getting the following content type value
application/x-www-form-urlencoded application/json application/json
How can you set multiple headers ?
Thanks
Pat
This is an example of what a bug report can look like. Please, feel free to also provide any other information relevant to the issue.
1.2.4
all
run this command:
bombardier -n 10000 -c 1000 "http://127.0.0.1:8080/to?url=http://10.100.99.41:38667"
start benchmark
it outputs:
"http://127.0.0.1:8080/to?url=http://" is not an acceptable protocol (http, https): http://127.0.0.1:8080/to?url=http://10.100.99.41:38667
First of all, thank you very much @codesenberg for this an amazing and useful project!
bombardier --version
bombardier version v1.1.2 windows/386
bombardier --help
or
bombardier -c 1 -r 1 -d 1s -q -l http://ya.ru --help
unknown short flag '-q'
or
bombardier -c 1 -r 1 -d 1s --no-print -l http://ya.ru --help
unknown long flag '--no-print'
As it is in the Docs.
usage: bombardier [<flags>] <url>
Fast cross-platform HTTP benchmarking tool
Flags:
--help Show context-sensitive help (also try --help-long
and --help-man).
--version Show application version.
-c, --connections=125 Maximum number of concurrent connections
-t, --timeout=2s Socket/request timeout
-l, --latencies Print latency statistics
-m, --method=GET Request method
-b, --body="" Request body
-f, --body-file="" File to use as request body
-s, --stream Specify whether to stream body using chunked
transfer encoding or to serve it from memory
--cert="" Path to the client's TLS Certificate
--key="" Path to the client's TLS Certificate Private Key
-k, --insecure Controls whether a client verifies the server's
certificate chain and host name
-H, --header="K: V" ... HTTP headers to use(can be repeated)
-n, --requests=[pos. int.] Number of requests
-d, --duration=10s Duration of test
-r, --rate=[pos. int.] Rate limit in requests per second
--fasthttp Use fasthttp client
--http1 Use net/http client with forced HTTP/1.x
--http2 Use net/http client with enabled HTTP/2.0
-p, --print=<spec> Specifies what to output. Comma-separated list of
values 'intro' (short: 'i'), 'progress' (short:
'p'), 'result' (short: 'r'). Examples:
* i,p,r (prints everything)
* intro,result (intro & result)
* r (result only)
* result (same as above)
-q, --no-print Don't output anything
-o, --format=<spec> Which format to use to output the result. <spec>
is either a name (or its shorthand) of some format
understood by bombardier or a path to the
user-defined template, which uses Go's
text/template syntax, prefixed with 'path:' string
(without single quotes), i.e.
"path:/some/path/to/your.template" or
"path:C:\some\path\to\your.template" in case of
Windows. Formats understood by bombardier are:
* plain-text (short: pt)
* json (short: j)
Args:
<url> Target's URL
usage: bombardier [<flags>] <url>
Fast cross-platform HTTP benchmarking tool
Flags:
--help Show context-sensitive help (also try --help-long
and --help-man).
--version Show application version.
-c, --connections=125 Maximum number of concurrent connections
-t, --timeout=2s Socket/request timeout
-l, --latencies Print latency statistics
-m, --method=GET Request method
-b, --body="" Request body
-f, --body-file="" File to use as request body
-s, --stream Specify whether to stream body using chunked
transfer encoding or to serve it from memory
--cert="" Path to the client's TLS Certificate
--key="" Path to the client's TLS Certificate Private Key
-k, --insecure Controls whether a client verifies the server's
certificate chain and host name
-H, --header="K: V" ... HTTP headers to use(can be repeated)
-n, --requests=[pos. int.] Number of requests
-d, --duration=10s Duration of test
-r, --rate=[pos. int.] Rate limit in requests per second
--fasthttp Use fasthttp client
--http1 Use net/http client with forced HTTP/1.x
--http2 Use net/http client with enabled HTTP/2.0
Args:
<url> Target's URL
To simulate different user and payload base on external file.
Sorry for the noob question. ... I'd like to know if tests are run from a single thread, or a single core, or multiple. How does this program handle the large number of requests that sends?
I've used other load testers and you can set max cpu cores, for example. I am curious.
I'm self taught, so please, bear with me if I can't ask questions here, or if it didn't make any sense to you. I apologize in advance.
Thank you very much.
v1.2
Not relevant, but Windows10, x64
Hi, i am running bombardier against Linkerd Service, curl works fine but requests with bombardier resulting in 5xx
curl -H "Host: hello" localhost:4140
Hello linkerd!
bombardier -c 125 -n 10000 -H "Host: hello" localhost:4140
Bombarding http://localhost:4140 with 10000 requests using 125 connections
10000 / 10000 [===================================================================================================================================================================] 100.00% 6s Done!
Statistics Avg Stdev Max
Reqs/sec 1578.00 682.09 4384
Latency 81.62ms 96.82ms 1.74s
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 10000
others - 0
Throughput: 624.13KB/s
Any help would be appreciated. Thanks
Hi! I am finding that https://github.com/hagen1778/fasthttploader is very similar to yours and it also uses fasthttp. Could you add comparison with that tool?
bombardier version v1.2.2
linux/amd64
nomadic@Dell-Inspiron-5759:~$ bombardier http://ya.ru
Bombarding http://ya.ru:80 for 10s using 125 connection(s)
[=================================================================================================================================================================] 10s
Done!
Statistics Avg Stdev Max
Reqs/sec 866.94 456.96 5251.28
Latency 143.78ms 38.89ms 1.33s
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 8778, 4xx - 0, 5xx - 0
others - 0
Throughput: 554.19KB/snomadic@Dell-Inspiron-5759:~$
Line wrapping at the end of statistics
Eats line break at the end
Same thing as #1. Maybe, there will be need to track down performance regressions and Go has great tools for both tests and benchmarks.
Hi,
I'm trying to load a test a binary upload endpoint using multipart/form-data and was wondering if it's possible to make bombardier handle this type of request?
thanks!
Currently project has zero test coverage, but in a future the need may arise, so I'll just leave this issue here as a starting point.
Is it possible to pass different (random) request Headers per each http request from an external file? if not, would you like to add this feature?
my use case is following, I would like to load test my application but for different user accounts in order to eliminate non-realistic cache hits. my app expects 'Authorization' request header to identify the end user.
I downloaded bombardier-windows-amd64.exe from the home page. There's no version info.
I have an ASPNET Core Web API. I am querying a POST method that accepts JSON. The POST responds with Status Code 201 if successful. I am using Bombardier locally to test the app - Windows 10 Pro OS.
I ran Bombardier with the following flags and the results are fine (my requests are large json files):
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> https://localhost:44384/api/run/sample -n 7000 -c 40 -H 'Content-Type: application/json'
Bombarding https://localhost:44384/api/run/sample with 7000 request(s) using 40 connection(s)
7000 / 7000 [====================] 100.00% 409/s 17s
Done!
Statistics Avg Stdev Max
Reqs/sec 409.96 365.59 2105.33
Latency 96.16ms 32.23ms 653.25ms
HTTP codes:
1xx - 0, 2xx - 7000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 2.84MB/s
Then ran it again but changed the number of requests to 1 and concurrent connections to 1 as well:
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 1 -c 1 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 1 request(s) using 1 connection(s)
1 / 1 [=====================================================] 100.00% 4/s 0s
Done!
Statistics Avg Stdev Max
Reqs/sec 249.75 0.00 499.50
Latency 23.97ms 0.00us 23.97ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 1
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s
I expected that the second call would be successful and return a 201.
But; it has an error:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s
Here's the output for 1, 625, 7000 requests:
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 1 -c 1 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 1 request(s) using 1 connection(s)
1 / 1 [===============================================================================================] 100.00% 4/s 0s
Done!
Statistics Avg Stdev Max
Reqs/sec 249.75 0.00 499.50
Latency 23.97ms 0.00us 23.97ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 1
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1
Throughput: 1.26MB/s
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> http://localhost:44384/api/run/sample -n 625 -c 5 -H 'Content-Type: application/json' -p i,p,r
Bombarding http://localhost:44384/api/run/sample with 625 request(s) using 5 connection(s)
625 / 625 [=========================================================================================] 100.00% 282/s 2s
Done!
Statistics Avg Stdev Max
Reqs/sec 296.14 84.83 526.34
Latency 16.92ms 3.06ms 40.00ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 625
Errors:
the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 625
Throughput: 8.91MB/s
.\bombardier-windows-amd64.exe -m POST -f <myjsonfile.json> https://localhost:44384/api/run/sample -n 7000 -c 40 -H 'Content-Type: application/json' -s
Bombarding https://localhost:44384/api/run/sample with 7000 request(s) using 40 connection(s)
7000 / 7000 [======================================================================================] 100.00% 378/s 18s
Done!
Statistics Avg Stdev Max
Reqs/sec 377.67 332.90 1947.40
Latency 103.79ms 27.69ms 448.00ms
HTTP codes:
1xx - 0, 2xx - 7000, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 2.63MB/s
In a setup where bombardier is used by some script it is quite inconvenient to parse bombardier's output as it turned out (see #24). As a first step to resolve this issue, I plan to add two flags: --print
(short: -p
) and --no-print
. The first one will control what to print in case something needs to be printed. Syntax will look something like:
--print=[<value>,]{1,2}<value>
<value> = intro (i) | progress (p) | result (r)
Some examples:
# prints intro, progress and result
bombardier --print=r,i,p <url>
# same as above
bombardier --print=intro,progress,result <url>
# result only
bombardier --print=r <url>
# same as above
bombardier -p=result <url>
In case you don't need any output, you will be able to use --no-print
flag.
How much system resource(CPU, RAM, storage, bandwidth etc.) I need to spawn 2 millions concurrent users?
becuase there is caching enabled on my sites and i want to test different urls.,
as if url gets requested twice it gets cached.
so it would be great if we could provide txt file containing list of urls.
thanks
Hi,
I want to know if there is a meaning of putting a higher amount of connections than the rate limit?
if I am running with c 500 and r 100 I will get a different result than if I run c 100 and r 100.
What is the meaning of it?
Thanks.
As a follow-up to #24 and #25, the next feature to resolve #24 is to implement a flag to control output format and some formats (like JSON, XML (?), etc.). The flag will most likely be named --format
and a shorthand is -o
(though, this is discussable). I also think it would be great to add support for user-defined templates, since it would be quite bothersome to add templates for all possible formats into the code base.
Please make a request mode of random urls from file, like --internet option in siege
I would like to see comparison with https://github.com/tsenart/vegeta and https://github.com/giltene/wrk2
I did a careful comparison for ReadonlyUint64Histogram
and ReadonlyFloat64Histogram
, and found no significant difference between them. See the following compare result:
Just change between float64
and uint64
, so leading to some kind of impression that redundant codes exist.
Is there any special reason to give latency
uint64 type and give request
float64 type ?
In my testing, bombardier and ksoftirqd uses all CPU and became the bottleneck. Is possible that working with DPDK?
When i run this command "go get -u -v github.com/codesenberg/bombardier" i get error
package github.com/codesenberg/bombardier/vendor/golang.org/x/net/http2:
vendor/golang.org/x/net/http2/pipe.go:1:1: expected 'package', found 'EOF'
Please give me a solution, thanks you so much|
[From MacOS]
When I try to do go get -u github.com/codesenberg/bombardier
I get the following error
build github.com/codesenberg/bombardier: cannot load gopkg.in/mattn/go-colorable.v0: cannot find module providing package gopkg.in/mattn/go-colorable.v0
Hey,
if I put URL without prefix, I get error:
bombardier -c 200 -d 30s -l ya.ru parse ya.ru: invalid URI for request
or
bombardier -c 200 -d 30s -l www.ya.ru parse www.ya.ru: invalid URI for request
Don't you think it will good idea to add it automatically?
HTTP/2.0 becomes increasingly more widespread and fasthttp looks more and more abandoned. AFAIK nothing from this list was implemented and it's been a year, since it was last updated. Issues left unanswered and PR's are not being merged or reviewed.
To address all of those points I plan to add net/http
clients: one with a forced HTTP/1.1 and another one with HTTP/2.0 enabled.
Client will be switched by setting a flag, probably, something like --fasthttp
, --http1
, --http2
. By default fasthttp
client will be used.
in case you've built bombardier yourself or version obtained by
# bombardier --version
bombardier version v1.2 linux/amd64
in case you are using binaries.
linux/amd64
# bombardier http://www-service/
host www-service: invalid host
Describe steps that can be used to reproduce the error.
Bombardier would try to resolve www-service
which is a valid DNS name in my setup.
Bombardier quits with the message:
host www-service: invalid host
I couldn't find the error message in the source code, so I think it is some vendor bug trying to validate domains even though they shouldn't. www-service.default
which is also a valid DNS name works fine.
Why the latency result of the bom is different with the python requests package?
bom average 1.58ms, requests 250ms
bom result:
Statistics Avg Stdev Max
Reqs/sec 6286.72 460.12 7012.96
Latency 1.58ms 349.64us 26.34ms
HTTP codes:
1xx - 0, 2xx - 63013, 3xx - 0, 4xx - 0, 5xx - 0
others - 0
Throughput: 2.13MB/s
python requests package:
>>> import requests
>>> url = "http://10.143.192.105:9362/hotrizon/GetScore?m2=000029da81eafcfcdbde82d6bd2d2&qid=29957933"
>>> import time
>>> def func():
... t = time.time()
... requests.get(url)
... print time.time() -t
...
>>> func()
0.376302957535
>>> func()
0.293756961823
>>> func()
0.292520046234
>>> func()
0.291940927505
>>> func()
0.291563034058
>>> func()
0.292473077774
Pasting and escaping large request bodies into a terminal is super inconvenient, therefore, it'd be nice to have an ability to read request body from file. It's up to user whether file will be read to the memory completely or served from disk every time. I plan to add two flags:
--body-from-disk
to read the body from disk each time;--body-from-mem
to read the file into memory.Suggestions on this are welcomed.
Hello,
This is a bug report about the latest version of bombardier with hash: 4b1b54923b01b38d1b2b238a87861388c08d3952
... running on Linux/amd64 with Go version go1.11.4 linux/amd64.
Running the following command, with or without http://
prefix:
bombardier 127.0.0.1:8080/
... sends the following sequence (double-checked with ngrep
):
T 127.0.0.1:38682 -> 127.0.0.1:8080 [AP] #51584
GET //? HTTP/1.1
User-Agent: fasthttp
Host: 127.0.0.1:8080
Note the double slash.
This problem only occurs with the fasthttp
option (which is the default), not with --http1
option.
A quick look makes me guess the problem happens here:
https://github.com/codesenberg/bombardier/blob/master/clients.go#L56
c.requestURI = "/" + u.Path + "?" + u.RawQuery
URL.Path
would return a slash for a URL that has a trailing slash, so the request ends up with two.
The output produced by bombardier
cannot be consumed by Prometheus.
It would be nice to have metrics like this:
Prometheus' node_exporter has textfile
collector. The collector scans directory for .prom
files and adds the metrics found in the file to its own metrics set.
This way, I can run bombardier
every minute, output results to bombardier.prom
file and the metrics will be picked up by Prometheus server.
I would like to come up with a number of metrics and have an option to output results as a Prometheus metric.
For example, the following output:
Statistics Avg Stdev Max
Reqs/sec 6607.00 524.56 7109
Latency 29.86ms 5.36ms 305.02ms
would result in the following metrics:
bombardier_http_request_rate_avg
bombardier_http_request_rate_max
bombardier_http_request_rate_stdev
bombardier_http_latency_avg
bombardier_http_latency_stdev
bombardier_http_latency_max
Each metric could have one or more labels associated with it.
For example, the following command:
bombardier -c 200 -d 10s -l http://ya.ru
would result in the following metrics:
conn: 200
duration: 10
url: http://ya.ru
Further, it would be helpful to output UUID associated with each test.
I can run go get -u github.com/codesenberg/bombardier
to install bombardier,
But when i try to build from source:
git clone github.com/codesenberg/bombardier
cd bombardier
go build .
i got error:
$ go build .
bombardier.go:15:2: use of internal package github.com/codesenberg/bombardier/internal not allowed
which is very wierd. Can anyone correct me?
I need to do a little mod here: for testing ElasticSearch server, whose REST api use HTTP GET with JSON Body...
timeout
and latency
params are somewhat long. It would be nice to type just -t
and -l
or something like that. data
flag could have a short version too.
The Windows 386 1.02 build fails to start sending requests with the output below. The x64 version seems to work for me. I'm running Windows 10 x64 and using the exes from the releases.
> bombardier-windows-386.exe http://localhost:5000/json
Bombarding http://localhost:5000/json for 10s using 125 connections
[-----------------------------------------------------------------------------]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x44cddc]
goroutine 71 [running]:
sync/atomic.AddUint64(0x1119ac94, 0x98, 0x0, 0x1, 0x69d57d)
C:/Go/src/sync/atomic/asm_386.s:112 +0xc
main.(*bombardier).writeStatistics(0x1119ac30, 0x1b, 0x0, 0x98, 0x0, 0xc8, 0xb3b0, 0x0)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier/bombardier.go:140 +0x59
main.(*bombardier).performSingleRequest(0x1119ac30)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier/bombardier.go:167 +0xe1
main.(*bombardier).worker(0x1119ac30)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier/bombardier.go:172 +0x3c
main.(*bombardier).bombard.func1(0x1119ac30)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier/bombardier.go:234 +0x48
created by main.(*bombardier).bombard
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier/bombardier.go:235 +0xed
Hi,
I want to do load test for a POST request that the Content-Type: application/x-www-form-urlencoded; charset=UTF-8.
and the form data is:
action=get_data&number=1234
is it possible to do it with bombadier?
Thanks.
bombardier version v1.1.1 windows/386
windows/386
bombardier -d 1m http://localhost:55555/test/00660066
I expected it to run for 1 minute.
Bombarding http://localhost:55555/test/00660066 for 1m0s using 125 connections
[============>------------------------------------------------------------] 50sp
anic: runtime error: index out of range
goroutine 167 [running]:
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).getShardFor(0x31372710, 0xe498c1cd, 0x4088ffa5, 0xfa894f1a)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:53 +0x5
c
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).Add(0x31372710, 0xe498c1cd, 0x4088ffa5, 0x1, 0x0)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:64 +0x3
1
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).Increment(0x31372710, 0xe498c1cd, 0x4088ffa5)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:58 +0x3
d
main.(*bombardier).recordRps(0x31270fc0)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:259 +0x1b8
main.(*bombardier).rateMeter(0x31270fc0)
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:239 +0xa5
created by main.(*bombardier).bombard
C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:273 +0xfc
This happens with no rhyme or reason I can detect. Sometimes it panics with -d 1s
, sometimes it works for 10s
with no issues.
Many other benchmarking tools have this feature and it's useful, so, I thought it would be reasonable to implement it too.
Using the windows version of bombardier:
bombard --version
bombardier version v1.2.3 windows/386
So it basically runs, but if I dare to provide a URL and no other options I get errors (below), This looks like a fasthttp problem, I presume the default, as it will run with OK with --http1 or --http2
Do I have to install a pre-req to use fasthttp?
bombard https://www.google.com/
Bombarding https://www.google.com:443/ for 10s using 125 connection(s)
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x401efc]
goroutine 13 [running]:
runtime/internal/atomic.Xadd64(0x11802774, 0x1, 0x0, 0x6ace95, 0x0)
C:/Go/src/runtime/internal/atomic/asm_386.s:102 +0xc
github.com/codesenberg/bombardier/vendor/github.com/valyala/fasthttp.(*HostClient).Do(0x118026c0, 0x1196c000, 0x11970000, 0x0, 0xada4e0)
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/vendor/github.com/valyala/fasthttp/client.go:996 +0x4f
main.(*fasthttpClient).do(0x11820690, 0x11812880, 0x0, 0x11824600, 0x440000, 0x6fdb2b)
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/clients.go:101 +0x17d
main.(*bombardier).performSingleRequest(0x11898a20)
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/bombardier.go:251 +0x31
main.(*bombardier).worker(0x11898a20)
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/bombardier.go:264 +0x47
main.(*bombardier).bombard.func1(0x11898a20)
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/bombardier.go:337 +0x4b
created by main.(*bombardier).bombard
C:/Users/frei/Documents/Go/Workspaces/Default/src/github.com/codesenberg/bombardier/bombardier.go:335 +0xaa
beside the processing bar, thanks
There are problems connecting with envoy proxy
bombardier version v1.2
linux/amd64
docker run --rm -d -p 10000:10000 envoyproxy/envoy:latest
$ curl -I http://localhost:10000
HTTP/1.1 200 OK
...
$ bombardier http://localhost:10000
Statistics Avg Stdev Max
Reqs/sec 9.45 210.84 4724.01
Latency 10.01s 3.58ms 10.01s
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 0, 4xx - 0, 5xx - 0
others - 125
Errors:
read tcp [::1]:9050->[::1]:10000: i/o timeout - 1
read tcp [::1]:9248->[::1]:10000: i/o timeout - 1
read tcp [::1]:9258->[::1]:10000: i/o timeout - 1
read tcp [::1]:9004->[::1]:10000: i/o timeout - 1
...
With net/http client all ok
$ bombardier --http1 http://localhost:10000
Statistics Avg Stdev Max
Reqs/sec 335.52 128.07 750.00
Latency 365.64ms 86.23ms 565.60ms
HTTP codes:
1xx - 0, 2xx - 0, 3xx - 3479, 4xx - 0, 5xx - 0
others - 0
Throughput: 308.91KB/s
A typical http connection
read tcp [::1]:9004->[::1]:10000: i/o timeout - 1
Hi there,
Are there any plans for adding support for the PATCH
HTTP request method?
when do:
go get -u github.com/codesenberg/bombardier .
get this error:
package _/root: unrecognized import path "_/root" (import path does not begin with hostname)
Can you help?
Go vendor seems working on Go-1.5, but now Go has become 1.13, things changed a lot?
I have a use case where I would like to benchmark a service that is protected with TLS Client Certificates, as well as allowing insecure TLS mode for development servers. I don't feel like this would be too difficult, as all we need to do is add TLSCertificates to a TLS config that should be set on the fasthttp Client.
I have coded up a solution: master...husobee:master and am more than happy to PR this if you are willing to consider it. Thanks!
v1.2
linux/amd64
I need to send a custom Host header. E.g.
bombardier http://localhost:8000 -l -o json -p r -c 1 --header="Host: somethingelse" -d 2s
Request 'Host' header would be replaced with my cusotm header
The Hostname from the URI was taken into the Host header field.
This has been discussed upstream:
valyala/fasthttp#318
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.