Skip to content

Commit

Permalink
docs(ch-bench): add query to check
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 16, 2023
1 parent 97c562b commit a187fee
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion dev/local/ch-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ The `scapedMetrics` depends on machine where node exporter runs, but it averages
The `scrapeConfigUpdateInterval` and `scrapeConfigUpdatePercent` controls new "tags" generation.
This does not impact metrics per second, but will generate more unique metrics.

To start:
## Attacking

```
docker compose up -d
```

## Profiling

To collect profiles:
```
./prof.sh
Expand All @@ -36,4 +38,16 @@ This will emit profiles as `cpu.out` and `mem.out`:
```
go tool pprof -alloc_space mem.out
go tool pprof cpu.out
```

## Checking

To check that points actually made to database, one can use following query:
```clickhouse
SELECT toDateTime(toStartOfSecond(timestamp)) as ts, COUNT()
FROM metrics_points
WHERE timestamp < (now() - toIntervalSecond(5))
GROUP BY ts
ORDER BY ts DESC
LIMIT 15;
```

0 comments on commit a187fee

Please sign in to comment.