[ { "Name":"Float", "name":"float", "Type":"float64", "ValueType":"FloatValue", "Nil":"0", "Agg":true, "Aggs": [ { "Name":"Mean", "OutputTypeName":"Float", "AccDecls":"var sum float64; var count int64", "Accumulate":"sum += a.Values[rowIdx]; count++", "AccEmit":"c.res.Timestamps[pos] = windowEnd; c.res.Values[pos] = sum / float64(count)", "AccReset":"sum = 0; count = 0" } ] }, { "Name":"Integer", "name":"integer", "Type":"int64", "ValueType":"IntegerValue", "Nil":"0", "Agg":true, "Aggs": [ { "Name":"Mean", "OutputTypeName":"Float", "AccDecls":"var sum int64; var count int64", "Accumulate":"sum += a.Values[rowIdx]; count++", "AccEmit":"c.res.Timestamps[pos] = windowEnd; c.res.Values[pos] = float64(sum) / float64(count)", "AccReset":"sum = 0; count = 0" } ] }, { "Name":"Unsigned", "name":"unsigned", "Type":"uint64", "ValueType":"UnsignedValue", "Nil":"0", "Agg":true, "Aggs": [ { "Name":"Mean", "OutputTypeName":"Float", "AccDecls":"var sum uint64; var count int64", "Accumulate":"sum += a.Values[rowIdx]; count++", "AccEmit":"c.res.Timestamps[pos] = windowEnd; c.res.Values[pos] = float64(sum) / float64(count)", "AccReset":"sum = 0; count = 0" } ] }, { "Name":"String", "name":"string", "Type":"string", "ValueType":"StringValue", "Nil":"\"\"" }, { "Name":"Boolean", "name":"boolean", "Type":"bool", "ValueType":"BooleanValue", "Nil":"false" } ]