cockroachdb / cockroachdb/cockroach

sql: add metric for sql CPU time

Open
#155,459 2 comments 0 reactions 0 assignees View on GitHub
A-sql-observability C-enhancement O-support P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We already collect CPU time spent in SQL (vs KV/storage) when collecting stats for a query execution. Similar to contention time, we should add a global metric to aggregate the SQL CPU time. This will allow users to determine when the time spent in SQL increases.

Jira issue: CRDB-55445

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing query-execution statistics that collect SQL CPU time, then trace how the contention-time metric is registered and aggregated globally. Done means a global metric reports aggregate SQL CPU time so users can observe increases in time spent in SQL rather than KV/storage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases, observability, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.