func (bA *Benchmark) errStat(err error) {
	errMsg := err.Error()

	//Creating a checksum for the error message;
	hash := md5.Sum([]byte(errMsg))
	//errKey is used as the key in map[string]errStat
	errKey := hex.EncodeToString(hash[:])

	bA.mutex.Lock()

	if item, ok := bA.errors[errKey]; ok {
		item.Count++
		bA.errors[errKey] = item
	} else {
		bA.errors[errKey] = errorStat{
			Message: errMsg,
			Count:   1,
		}
	}

	bA.errorCounter++

	bA.mutex.Unlock()
}
//errStat sets the error statistics
errStat sets the error statistics
// errStat sets the error statistics
func (bA *Benchmark) errStat(err error) {
	errMsg := err.Error()
	hash := md5.Sum([]byte(errMsg))
	errKey := hex.EncodeToString(hash[:])
	bA.mutex.Lock()
	if item, ok := bA.errors[errKey]; ok {
		item.Count++
		bA.errors[errKey] = item
	} else {
		bA.errors[errKey] = errorStat{
			Message: errMsg,
			Count:   1,
		}
	}
	bA.errorCounter++
	bA.mutex.Unlock()
}
func ( bA * Benchmark ) errStat ( err error ) { errMsg := err . Error ( ) hash := md5 . Sum ( [ ] byte ( errMsg ) ) errKey := hex . EncodeToString ( hash [ : ] ) bA . mutex . Lock ( ) if item , ok := bA . errors [ errKey ] ; ok { item . Count ++ bA . errors [ errKey ] = item } else { bA . errors [ errKey ] = errorStat { Message : errMsg , Count : 1 , } } bA . errorCounter ++ bA . mutex . Unlock ( ) }
errStat sets the error statistics
errStat sets the error statistics
//Creating a checksum for the error message; //errKey is used as the key in map[string]errStat