()
| 56 | } |
| 57 | |
| 58 | func (p *progress) report() { |
| 59 | t := time.Tick(time.Second) |
| 60 | |
| 61 | z.StatsPrint() // Just print once. |
| 62 | for { |
| 63 | select { |
| 64 | case <-t: |
| 65 | p.reportOnce() |
| 66 | case <-p.shutdown: |
| 67 | p.shutdown <- struct{}{} |
| 68 | return |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func (p *progress) reportOnce() { |
| 74 | mapEdgeCount := atomic.LoadInt64(&p.mapEdgeCount) |