()
| 234 | } |
| 235 | |
| 236 | func (s *Statistics) serializeEvents() []*protocol.Event { |
| 237 | nEvents := len(s.Events) |
| 238 | serialized := make([]*protocol.Event, nEvents) |
| 239 | |
| 240 | for i, e := range s.Events { |
| 241 | serialized[i] = e.Serialize() |
| 242 | } |
| 243 | |
| 244 | return serialized |
| 245 | } |
| 246 | |
| 247 | // emptyStats empties the stats once we've sent them to the GUI. |
| 248 | // We don't need them anymore here. |