This changeset breaks the API of Attack in order to decouple Reporters and the Attack function. Attack now returns a slice with non-deterministic order of Results which one can use on the calling code with or without Reporters, hence making it much more useful on a library usage setting. These developments could be of interest to issue #11 which was closed in the past.
12 lines
168 B
Go
12 lines
168 B
Go
package vegeta
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// Reporter represents any reporter of the results of the test
|
|
type Reporter interface {
|
|
Report(io.Writer) error
|
|
Add(res *Result)
|
|
}
|