func (bA *Benchmark) Init() {
	//No.of go routines to be spwaned (i.e. concurrent requests)
	bA.waitGroup.Add(int(bA.TotalRequests))

	//Progress is always showed every time it completes 1/10th of the total number of requests
	bA.StatReqCount = bA.TotalRequests / 10

	//If wait time is not provided, calculate based on benchmark duration and total no.of requests
	if bA.WaitPerReq == 0 {
		bA.WaitPerReq = time.Nanosecond * time.Duration((bA.BenchDuration*1000000)/bA.TotalRequests)
	}

	//if 1/10th of total requests is less than 1, it's set to 1
	if bA.StatReqCount == 0 {
		bA.StatReqCount = 1
	}

}
//Init initializes all the fields with their respective values
Init initializes all the fields with their respective values
// Init initializes all the fields with their respective values
func (bA *Benchmark) Init() {
	bA.waitGroup.Add(int(bA.TotalRequests))
	bA.StatReqCount = bA.TotalRequests / 10
	if bA.WaitPerReq == 0 {
		bA.WaitPerReq = time.Nanosecond * time.Duration((bA.BenchDuration*1000000)/bA.TotalRequests)
	}
	if bA.StatReqCount == 0 {
		bA.StatReqCount = 1
	}
}
func ( bA * Benchmark ) Init ( ) { bA . waitGroup . Add ( int ( bA . TotalRequests ) ) bA . StatReqCount = bA . TotalRequests / 10 if bA . WaitPerReq == 0 { bA . WaitPerReq = time . Nanosecond * time . Duration ( ( bA . BenchDuration * 1000000 ) / bA . TotalRequests ) } if bA . StatReqCount == 0 { bA . StatReqCount = 1 } }
Init initializes all the fields with their respective values
Init initializes all the fields with their respective values
//No.of go routines to be spwaned (i.e. concurrent requests) //Progress is always showed every time it completes 1/10th of the total number of requests //If wait time is not provided, calculate based on benchmark duration and total no.of requests //if 1/10th of total requests is less than 1, it's set to 1