Skip to content

Commit

Permalink
Merge #96213
Browse files Browse the repository at this point in the history
96213: cli: update hot-ranges.sh to include cpu_time r=shralex a=kvoli

Previously, `cpu_time_per_second` was not included in the `hot-ranges.sh` utility. This patch updates the utility script to include `cpu_time_per_second`.

resolves: #96212

Release note (cli change): Add `cpu_time_per_second` to the `hot-ranges.sh` and `hot-ranges-tenant.sh` utility debug zip scripts.

Co-authored-by: Austen McClernon <[email protected]>
  • Loading branch information
craig[bot] and kvoli committed Jan 31, 2023
2 parents ac65603 + 1ebc6ad commit 8e15b54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cli/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ find . -name cpu.pprof -print0 | xargs -0 go tool pprof -tags
{
s := zc.clusterPrinter.start("hot range summary script")
if err := z.createRaw(s, debugBase+"/hot-ranges.sh", []byte(`#!/bin/sh
for stat in "queries" "writes" "reads" "write_bytes" "read_bytes"; do
for stat in "queries" "writes" "reads" "write_bytes" "read_bytes" "cpu_time"; do
echo "$stat"
find . -path './nodes/*/ranges/*.json' -print0 | xargs -0 grep "$stat"_per_second | sort -rhk3 | head -n 10
done
Expand All @@ -291,7 +291,7 @@ done
{
s := zc.clusterPrinter.start("tenant hot range summary script")
if err := z.createRaw(s, debugBase+"/hot-ranges-tenant.sh", []byte(`#!/bin/sh
for stat in "queries" "writes" "reads" "write_bytes" "read_bytes"; do
for stat in "queries" "writes" "reads" "write_bytes" "read_bytes" "cpu_time"; do
echo "$stat"_per_second
find . -path './tenant_ranges/*/*.json' -print0 | xargs -0 grep "$stat"_per_second | sort -rhk3 | head -n 10
done
Expand Down

0 comments on commit 8e15b54

Please sign in to comment.