Skip to content

isabella232/go-hammer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%