Skip to content

TSBS DevOps — Metrics by Service

TSBS DevOps benchmark · all TSBS DevOps queries

CPU metrics grouped by service

Representative SQL

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

SELECT
t.service,
COUNT(DISTINCT c.hostname) AS host_count,
AVG(c.usage_user + c.usage_system) AS avg_cpu_total
FROM cpu AS c
JOIN tags AS t
ON c.hostname = t.hostname
WHERE
c.time >= '2024-01-01 18:00:00' AND c.time < '2024-01-01 19:00:00'
GROUP BY
t.service
ORDER BY
avg_cpu_total DESC

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['by-service'])

Source

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