MCPcopy Create free account
hub / github.com/AdRoll/baker / add

Method add

output/stats.go:173–194  ·  view source on GitHub ↗
(ll baker.Record)

Source from the content-addressed store, hash-verified

171}
172
173func (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
196func (s *timestampStats) print(w io.Writer) error {
197 csvw := csv.NewWriter(w)

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected