func (b *Work) Init() {
	b.once.Do(
		func() {
			b.results = make(chan *result, min(b.C*1000, maxResult))
			b.stopCh = make(chan struct{}, b.C)
		},
	)
}
Init initializes internal data-structures
package benchmark
import (
	"bytes"
	"crypto/tls"
	"io"
	"net/http"
	"net/http/httptrace"
	"net/url"
	"os"
	"sync"
	"time"
	"golang.org/x/net/http2"
)
const maxResult = 1000000
const maxIdleConn = 500
var startTime = time.Now()
func now() time.Duration { return time.Since(startTime) }
type result struct {
	err           error
	statusCode    int
	offset        time.Duration
	duration      time.Duration
	connDuration  time.Duration  
	dnsDuration   time.Duration  
	reqDuration   time.Duration  
	resDuration   time.Duration  
	delayDuration time.Duration  
	contentLength int64
}
type Work struct {
	Request *http.Request
	RequestBody []byte
	RequestFunc func() *http.Request
	N int
	C int
	H2 bool
	Timeout int
	QPS float64
	DisableCompression bool
	DisableKeepAlives bool
	DisableRedirects bool
	ProxyAddr *url.URL
	Writer io.Writer
	once    sync.Once
	results chan *result
	stopCh  chan struct{}
	start   time.Duration
	report *report
}
func (b *Work) writer() io.Writer {
	if b.Writer == nil {
		return os.Stdout
	}
	return b.Writer
}