code: func (bm *Benchmark) Close() {
  	close(bm.subChannel)
  	close(bm.pubChannel)
  
  	for s := range bm.subChannel {
  		bm.Subs.AddSample(s)
  	}
  	for s := range bm.pubChannel {
  		bm.Pubs.AddSample(s)
  	}
  
  	if bm.Subs.HasSamples() {
  		bm.Start = bm.Subs.Start
  		bm.End = bm.Subs.End
  	} else {
  		bm.Start = bm.Pubs.Start
  		bm.End = bm.Pubs.End
  	}
  
  	if bm.Subs.HasSamples() && bm.Pubs.HasSamples() {
  		if bm.Start.After(bm.Subs.Start) {
  			bm.Start = bm.Subs.Start
  		}
  		if bm.Start.After(bm.Pubs.Start) {
  			bm.Start = bm.Pubs.Start
  		}
  
  		if bm.End.Before(bm.Subs.End) {
  			bm.End = bm.Subs.End
  		}
  		if bm.End.Before(bm.Pubs.End) {
  			bm.End = bm.Pubs.End
  		}
  	}
  
  	bm.MsgBytes = bm.Pubs.MsgBytes + bm.Subs.MsgBytes
  	bm.IOBytes = bm.Pubs.IOBytes + bm.Subs.IOBytes
  	bm.MsgCnt = bm.Pubs.MsgCnt + bm.Subs.MsgCnt
  	bm.JobMsgCnt = bm.Pubs.JobMsgCnt + bm.Subs.JobMsgCnt
  }
docs: // Close organizes collected Samples and calculates aggregates. After Close(), no more samples can be added.