influxdata / Litmus

testing framework
0 stars 0 forks source link

Quartz query: get storage usage #194

Closed gshif closed 4 years ago

gshif commented 5 years ago

Test quartz's query (defined in https://github.com/influxdata/quartz/blob/cloud-two-dev/lib/quartz/two/billing/organization_usage.ex):

def get_storage_usage(org_id, start, stop) do
    """
    from(bucket: "system_usage")
    |> range(start: #{start}, stop: #{stop})
    |> filter(fn: (r) =>
    r.org_id != ""
    and r.org_id == "#{org_id}"
    and r._measurement == "storage_usage_org_bytes"
    )
    |> group()
    |> aggregateWindow(every: 1h, fn: mean)
    |> keep(columns: ["_time", "_value", "_start"])
    |> fill(column: "_value", value: 0.0)
    |> map(fn: (r) => ({r with _value: int(v: math.round(x: r._value))}))
    |> rename(columns: {_value: "storage_b"})
    |> yield(name: "storage_b")
    """
  end
Nlyandres commented 4 years ago

Completed test creation, but nee to investigate results inconsistency

Nlyandres commented 4 years ago

Create issue 6451 under IDPE for Jacob to investigate

Nlyandres commented 4 years ago

This query was changed from Ord storage measurement to bucket storage measurement and covered in #7407