(ll baker.Record)
| 171 | } |
| 172 | |
| 173 | func (s *timestampStats) add(ll baker.Record) { |
| 174 | b := ll.Get(s.fieldIdx) |
| 175 | if b == nil { |
| 176 | s.nempties++ |
| 177 | return |
| 178 | } |
| 179 | |
| 180 | ts, err := strconv.Atoi(string(b)) |
| 181 | if err != nil { |
| 182 | s.nerrors++ |
| 183 | return |
| 184 | } |
| 185 | |
| 186 | if int64(ts) < s.first { |
| 187 | s.first = int64(ts) |
| 188 | } |
| 189 | if int64(ts) > s.last { |
| 190 | s.last = int64(ts) |
| 191 | } |
| 192 | |
| 193 | s.qt.Insert(float64(ts)) |
| 194 | } |
| 195 | |
| 196 | func (s *timestampStats) print(w io.Writer) error { |
| 197 | csvw := csv.NewWriter(w) |