Skip to content

TSBS DevOps — Double GroupBy - 5 Minutes

TSBS DevOps benchmark · all TSBS DevOps queries

Fine-grained CPU aggregations

Representative SQL

Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).

SELECT
hostname,
DATE_TRUNC('SECOND', time) AS second,
AVG(usage_user) AS avg_user,
AVG(usage_system) AS avg_system
FROM cpu
WHERE
time >= '2024-01-02 10:00:00' AND time < '2024-01-02 10:05:00'
GROUP BY
hostname,
DATE_TRUNC('SECOND', time)
ORDER BY
hostname,
second

Representative DataFrame

No DataFrame implementation is registered for this query.

Get the exact query for your run

The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:

from benchbox import TSBSDevOps
bench = TSBSDevOps(scale_factor=1.0) # your scale factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['double-groupby-5-min'])

Source

Query text: benchbox/core/tsbs_devops/queries.py