ComputeUsageRow is one aggregated row served by the billing pull API: the sum of every closed bucket for one key on one UTC day. CPU and MemGiB are the exact NUMERIC decimal texts (e.g. "8", "1.5", "0.5") carried as json.Number so they serialize as unquoted JSON numbers with full precision.
| 34 | // the exact NUMERIC decimal texts (e.g. "8", "1.5", "0.5") carried as |
| 35 | // json.Number so they serialize as unquoted JSON numbers with full precision. |
| 36 | type ComputeUsageRow struct { |
| 37 | Date string `json:"date"` |
| 38 | OrgID string `json:"org_id"` |
| 39 | TeamID int64 `json:"team_id"` |
| 40 | QuerySource string `json:"query_source"` |
| 41 | CPU json.Number `json:"cpu"` |
| 42 | MemGiB json.Number `json:"mem_gib"` |
| 43 | CPUSeconds int64 `json:"cpu_seconds"` |
| 44 | MemorySeconds int64 `json:"memory_seconds"` |
| 45 | } |
| 46 | |
| 47 | // milliUnitDecimal renders value/denom as an exact decimal string with no |
| 48 | // trailing zeros, using integer math only. denom must divide a power of 10 |
nothing calls this directly
no outgoing calls
no test coverage detected