Giter Club home page Giter Club logo

bombardier's People

Contributors

baiwfg2 avatar codesenberg avatar husobee avatar iyuq avatar maurice2k avatar roberthenry6bev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bombardier's Issues

invalid memory address or nil pointer dereference when using fasthttp (windows)

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

Any reason for differentiating the type of Result.Latencies and Result.Requests ?

I did a careful comparison for ReadonlyUint64Histogram and ReadonlyFloat64Histogram , and found no significant difference between them. See the following compare result:

image

image

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 ?

URL without https/http prefix

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?

feature: flags to control the output

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.

feature: different output formats

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.

HTTPS support

can't bypass https when the https certificate is issued by an unknown authority(self generated).

go build error under go-1.13.1 windows

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...

fasthttp: Host request-header not being passed correctly

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

Benchmarks

Same thing as #1. Maybe, there will be need to track down performance regressions and Go has great tools for both tests and benchmarks.

Panic starting 1.02 Windows 386 version

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

can i input txt file with different URLs in it ?

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

Bombardier checks hostname plausibility when it shouldn't

What version of bombardier are you using?

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.

What operating system and processor architecture are you using (if relevant)?

linux/amd64

What did you do?

# bombardier http://www-service/
host www-service: invalid host

Describe steps that can be used to reproduce the error.

What you expected to happen?

Bombardier would try to resolve www-service which is a valid DNS name in my setup.

What actually happened?

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.

System requirements

How much system resource(CPU, RAM, storage, bandwidth etc.) I need to spawn 2 millions concurrent users?

cannot benchmark url like this

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.

What version of bombardier are you using?

1.2.4

What operating system and processor architecture are you using (if relevant)?

all

What did you do?

run this command:

bombardier -n 10000 -c 1000 "http://127.0.0.1:8080/to?url=http://10.100.99.41:38667"

What you expected to happen?

start benchmark

What actually happened?

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

Panic in histogram.go:53 using 1.1.1 on win/386

What version of bombardier are you using?

bombardier version v1.1.1 windows/386

What operating system and processor architecture are you using (if relevant)?

windows/386

What did you do?

bombardier -d 1m http://localhost:55555/test/00660066

What you expected to happen?

I expected it to run for 1 minute.

What actually happened?

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.

Body Parameter ignored for --http1 and --http2 flags.

I build bombardier from source using go1.10.1 darwin/amd64. I also cross compiled to linux/amd64.

What version of bombardier are you using?

db65d7c4537354aabece20b1fbd0127f51145f11

What operating system and processor architecture are you using (if relevant)?

linux/amd64 & darwin/amd64

What did you do?

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 --bodyand --body-file flags gets ignored for --http1 and --http2 flags. I verified this by removing those flags and the requests passed through properly.

What you expected to happen?

I expect the body to be passed through in post requests when not utilizing fast-http

What actually happened?

The body parameters weren't passed through.

P.S. Thanks for creating this awesome tool.

multipart/form-data ?

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!

TLS insecure mode and Client Certificate Support

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!

Unable to to go get

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

passing different request Headers per each request from an external file

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.

feature: rate limiting

Many other benchmarking tools have this feature and it's useful, so, I thought it would be reasonable to implement it too.

Random urls

Please make a request mode of random urls from file, like --internet option in siege

feature: body from file

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.

feature: Prometheus node_exporter compatible output

The output produced by bombardier cannot be consumed by Prometheus.

It would be nice to have metrics like this:

image

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.

'Host' Header cannot be set

What version of bombardier are you using?

v1.2

What operating system and processor architecture are you using (if relevant)?

linux/amd64

What did you do?

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

What you expected to happen?

Request 'Host' header would be replaced with my cusotm header

What actually happened?

The Hostname from the URI was taken into the Host header field.

This has been discussed upstream:
valyala/fasthttp#318

Not all request flags are available.

First of all, thank you very much @codesenberg for this an amazing and useful project!

What version of bombardier are you using?

bombardier --version
bombardier version v1.1.2 windows/386

What did you do?

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'

What you expected to happen?

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

What actually happened?

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

compare with python requests

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

go get -u -v github.com/codesenberg/bombardier errror

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]

macOS kernel panic on bombardier benchmark

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.

What version of bombardier are you using?

5e387c23434f632213c1039d5f0ada93d6153f1e

What operating system and processor architecture are you using (if relevant)?

darwin/amd64

macOS 10.15.5 (Catalina)

Go version: go version go1.13.7 darwin/amd64

What did you do?

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

What you expected to happen?

Some results to be printed to console.

What actually happened?

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

switchable HTTP client and HTTP/2.0 support

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.

i/o timeout with fasthttp client

There are problems connecting with envoy proxy

What version of bombardier are you using?

bombardier version v1.2

What operating system and processor architecture are you using (if relevant)?

linux/amd64

What did you do?

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

What you expected to happen?

A typical http connection

What actually happened?

read tcp [::1]:9004->[::1]:10000: i/o timeout - 1

Include how to set headers in the readme

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

feature: 95th percentile in latency statistics

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
      }
    }
  }
}

Bombardier returns 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

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

Bombardier with fasthttp option is sending a double slash

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.

Tests

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.

Are requests single or multi-threaded?

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.

What version of bombardier are you using?

v1.2

What operating system and processor architecture are you using (if relevant)?

Not relevant, but Windows10, x64

Line wrapping at the end of statistics

What version of bombardier are you using?

bombardier version v1.2.2

What operating system and processor architecture are you using (if relevant)?

linux/amd64

What did you do?

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:~$ 

What you expected to happen?

Line wrapping at the end of statistics

What actually happened?

Eats line break at the end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.