in cmd/core/runner/runner.go [58:89]
func (r *runner) Before(test int, opts interface{}) error {
o, ok := opts.(*options.Options)
if !ok {
return tester.ErrInvalidOptions
}
cancel := utils.NewBackgroundSpinner("Cleaning up the memory", 0)
r.reset()
runtime.GC()
cancel()
cancel = utils.NewBackgroundSpinner("Preparing the test", 0)
r.recorder = make(chan interface{}, o.BufferSize)
r.recorders = []bender.Recorder{
recorders.NewLogrusRecorder(logrus.StandardLogger(), logrus.Fields{"test": test}),
}
r.recorders = append(r.recorders, o.Recorders...)
if !o.NoStatistics {
r.histogram = hist.NewHistogram(2*int(o.Timeout/o.Unit), int(o.Unit))
r.recorders = append(r.recorders, bender.NewHistogramRecorder(r.histogram))
}
cancel()
log.Printf("Running test: %d\n", test)
return nil
}