https://github.com/vimeo/go-hammer
https://github.com/vimeo/go-hammer
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vimeo/go-hammer
- Owner: vimeo
- License: mit
- Created: 2015-04-23T17:17:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-18T15:38:40.000Z (over 10 years ago)
- Last Synced: 2025-04-03T22:41:35.884Z (9 months ago)
- Language: Go
- Size: 181 KB
- Stars: 10
- Watchers: 13
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hammer
Hammer is an HTTP load-testing / load-generation tool. Its goals are to be
high-performance and flexible. It consists of a CLI tool similar to
apachebench (ab) or siege, and a library that can be used for more advanced
scenarios.
## Installing the CLI tool
go get github.com/vimeo/go-hammer/cli/hammer
## Using the CLI tool
Please read the
[documentation](http://godoc.org/github.com/vimeo/go-hammer/cli/hammer).
## Installing the library
go get github.com/vimeo/go-hammer/hammer
## Example library use
import "github.com/vimeo/go-hammer/hammer"
h := hammer.Hammer{
RunFor: 30,
Threads: 10,
QPS: 100,
GenerateFunction: hammer.RandomURLGenerator(
hammer.RandomURLGeneratorOptions{
URLs: []string{"http://www.example.com"},
Name: "example"
},
),
}
statschan := make(chan hammer.StatsSummary)
go func() {
for stats := range statschan {
stats.PrintReport(os.Stdout)
}
}
h.Run(statschan)
## Library documentation
[GoDoc](http://godoc.org/github.com/vimeo/go-hammer/hammer).