code: func (as *AgentServer) CollectExecutionStatistics(stream pb.GleamAgent_CollectExecutionStatisticsServer) error {
  	var statsChan chan *pb.ExecutionStat
  
  	for {
  		stats, err := stream.Recv()
  		if err == io.EOF {
  			return nil
  		}
  		if err != nil {
  			return err
  		}
  		if statsChan == nil {
  			statsChan = getStatsChan(stats.FlowHashCode, stats.Stats[0].GetStepId(), stats.Stats[0].GetTaskId())
  		}
  
  		statsChan <- stats
  		// fmt.Printf("received stats: %+v\n", stats)
  	}
  
  }
docs: // Collect stat from "gleam execute" process