code: func (bm *Benchmark) CSV() string {
  	var buffer bytes.Buffer
  	writer := csv.NewWriter(&buffer)
  	headers := []string{"#RunID", "ClientID", "MsgCount", "MsgBytes", "MsgsPerSec", "BytesPerSec", "DurationSecs"}
  	if err := writer.Write(headers); err != nil {
  		log.Fatalf("Error while serializing headers %q: %v", headers, err)
  	}
  	groups := []*SampleGroup{bm.Subs, bm.Pubs}
  	pre := "S"
  	for i, g := range groups {
  		if i == 1 {
  			pre = "P"
  		}
  		for j, c := range g.Samples {
  			r := []string{bm.RunID, fmt.Sprintf("%s%d", pre, j), fmt.Sprintf("%d", c.MsgCnt), fmt.Sprintf("%d", c.MsgBytes), fmt.Sprintf("%d", c.Rate()), fmt.Sprintf("%f", c.Throughput()), fmt.Sprintf("%f", c.Duration().Seconds())}
  			if err := writer.Write(r); err != nil {
  				log.Fatalf("Error while serializing %v: %v", c, err)
  			}
  		}
  	}
  
  	writer.Flush()
  	return buffer.String()
  }
docs: // CSV generates a csv report of all the samples collected