Skip to content

Introduce blockgen as an optimization target#1346

Closed
blt wants to merge 1 commit intomainfrom
blt/blockgen_binary
Closed

Introduce blockgen as an optimization target#1346
blt wants to merge 1 commit intomainfrom
blt/blockgen_binary

Conversation

@blt
Copy link
Copy Markdown
Collaborator

@blt blt commented May 8, 2025

What does this PR do?

This commit introduces a new binary to the project 'blockgen' which is rigged to
read a lading.yaml and generate the block cache for that config, doing nothing
more. This allows us to use tools like hyperfine, perf etc to debug performance
problems at a macro level, as opposed to a reliance directly on criterion
benchmarks.

With the added example config we have from hyperfine:

Benchmark 1: ./target/release/blockgen examples/lading-otel-metrics.yaml
  Time (mean ± σ):      1.705 s ±  0.018 s    [User: 1.628 s, System: 0.070 s]
  Range (min … max):    1.689 s …  1.751 s    10 runs

Motivation

REF SMPTNG-659

This commit introduces a new binary to the project 'blockgen' which is rigged to
read a lading.yaml and generate the block cache for that config, doing nothing
more. This allows us to use tools like hyperfine, perf etc to debug performance
problems at a macro level, as opposed to a reliance directly on criterion
benchmarks.

With the added example config we have from hyperfine:

```
Benchmark 1: ./target/release/blockgen examples/lading-otel-metrics.yaml
  Time (mean ± σ):      1.705 s ±  0.018 s    [User: 1.628 s, System: 0.070 s]
  Range (min … max):    1.689 s …  1.751 s    10 runs
```

REF SMPTNG-659

Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
@blt blt added the no-changelog label May 8, 2025 — with Graphite App
@blt blt marked this pull request as ready for review May 8, 2025 18:34
@blt blt requested a review from a team as a code owner May 8, 2025 18:34
@scottopell
Copy link
Copy Markdown
Contributor

@blt
Copy link
Copy Markdown
Collaborator Author

blt commented May 8, 2025

isn't this pretty similar to https://github.com/DataDog/lading/blob/main/lading/src/bin/payloadtool.rs ?

Lol yep. I'd recorded "Generator failed to generate..." in my notes but didn't realize it was not a one-off tool that made it. I'll compare and adjust this PR or remove it.

@blt blt closed this May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants