• Stars
    star
    117
  • Rank 301,263 (Top 6 %)
  • Language
    Go
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTTP server benchmarking tool

Benchttp

GoDoc Build Status

Benchttp implements the most commonly used features of ApacheBench.

Benchmarks are limited with either -n number-of-requests or -d total-duration.

Install

go install github.com/siadat/benchttp/cmd/benchttp@master

Usage

Benchmark 1000 requests

benchttp -n 1000 http://localhost:8080

Benchmark 1000 requests with maximum 10 concurrently running requests

benchttp -n 1000 -c 10 http://localhost:8080

Benchmark server for 1s

benchttp -d 1s http://localhost:8080

Benchmark server for 1s with max 10 concurrently running requests

benchttp -d 1s -c 10 http://localhost:8080

Output

 Duration: 2.238s
 Requests: 10000 (4468.7/s)
Responses: 10000 (4468.7/s)
    [200]: 10000

Options

  • -d duration, e.g., -d 10s
  • -n number-of-requests, e.g., -n 1000
  • -c max-concurrent-requests, e.g. -c 100
  • -u admin:pass supply basic authentication
  • -H "key: value" custom header
  • -i do HEAD requests instead of GET

Contribute

Issues and PRs are welcome.

Thanks

Thanks @Deleplace for testing and reviewing the code.

License

MIT

More Repositories

1

chrome-ff

Fuzzy Finder for Chrome/Chromium tabs and windows
JavaScript
147
star
2

ipc

Pure Go wrapper for System V message queue
Go
63
star
3

gofile

HTTP/1.1 directory listing and file server using TCP sockets for fun
Go
59
star
4

eton

eton is a note-taking cli tool
Go
52
star
5

kubetop

Kubernetes nodes, pods, services, and deployments in a glance
Go
37
star
6

advanced-bash-scripting-guide

HTML
35
star
7

blgo

blgo is a 49cc engine for my blog
Go
20
star
8

session-finder

Tmux fuzzy session finder
Shell
19
star
9

interface-type-check

Type check the empty interface{}
Go
15
star
10

ballboy

Simple image processing for detecting a moving ball
C++
10
star
11

chrome-godoc

Find Go docs quickly using Chrome omnibox
JavaScript
10
star
12

leges

Attribute-based access control (Go pkg + http service)
Go
10
star
13

intertype

Go static type-checker for annotated empty interface{}s
Go
9
star
14

lash

fuzzy window finder and launcher for tmux
Shell
9
star
15

gosetup

gosetup sets up GOPATH and PATH
Go
8
star
16

inspect

Use a REPL to inspect JSON, CSV, HTML data
Ruby
6
star
17

wordle-solver-haskell

solve a wordle with haskell
Haskell
6
star
18

golinkname-test

A minimal example of go:linkname compiler directive for demonstration only
Go
6
star
19

in_batches

Backport of ActiveRecord::Relation#in_batches for Rails 4 applications
Ruby
6
star
20

gradboostreg

Gradient Boosting Regressor in Go
Go
5
star
21

simple-soccer

Just a stupid simple soccer game with PyGame.
Python
4
star
22

netmatch

a service that matches and synchronizes HTTP requests
Go
4
star
23

siadat.github.io

Source for my homepage
JavaScript
3
star
24

emojifind

🔍 Look up emojis by aliases, tags, or description
Shell
3
star
25

installgo

Bash script to install Go and set GOPATH
Shell
3
star
26

tix

manage text files, with curses and gtk ui.
Python
2
star
27

lld

line by line worddiff
Perl
2
star
28

prql-parser

Go
1
star
29

goping

ICMP ping in Go
Go
1
star
30

chrome-hn

Omnibox commands for HN comments
JavaScript
1
star
31

group-interface

Go
1
star
32

dotfiles

Shell
1
star
33

shell-scripts

A few scripts for simple daily tasks
Shell
1
star
34

markfile

Go
1
star
35

bake

Code for GopherCon presentation
Go
1
star
36

hl

Highlights regexp matches, and all lines in given ranges.
Perl
1
star