Skip to content

Add a log_level build option and teardown tracing#96

Merged
lukashes merged 1 commit into
mainfrom
chore/log-level-tracing
Jul 12, 2026
Merged

Add a log_level build option and teardown tracing#96
lukashes merged 1 commit into
mainfrom
chore/log-level-tracing

Conversation

@lukashes

Copy link
Copy Markdown
Owner

What

  • New -Dlog_level build option (err, warn, info, debug; default info). Raises the compiled-in log level so std.log.debug is emitted; default info keeps Release/prod output clean. The value is validated at zig build time. Wired through build_options into std_options.
  • The load stand Dockerfile builds with -Dlog_level=debug (keeps ReleaseFast perf, gains the traces).
  • Debug traces along the shutdown path: produce-failed propagation, the flush worker cancel, and processor/producer deinit.
  • Drop the two per-message debug logs from the hot loop ("Sent message", "No matching streams") so raising the level does not flood the output.

Why

std.log.debug was compiled out of the ReleaseFast load-stand build, so a hung teardown showed no detail. This makes the fail-fast path observable on the stand.

Independent of the replication work; targets main.

std.log.debug is compiled out of Release builds, so the load stand never
saw teardown or fail-fast detail. Add a -Dlog_level build option (err,
warn, info, debug; default info, so prod stays clean), wired through
build_options into std_options. The load stand Dockerfile builds with
-Dlog_level=debug.

Trace the shutdown path: produce-failed propagation, the flush worker
cancel, and processor/producer deinit. Drop the two per-message debug logs
from the hot loop so raising the level does not flood the output.
@lukashes lukashes added this to the v0.3.0: GA release milestone Jul 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Current run is the minimum over 3 passes, compared against the base branch (main @ c98e9cc), built on the same runner.

Benchmark Baseline Current Δ Time Allocs Status
Converter DELETE 102.88μs 104.58μs +1.6% 12 → 12 ➡️
Converter INSERT 100.45μs 101.58μs +1.1% 12 → 12 ➡️
Converter UPDATE 141.19μs 141.31μs +0.1% 21 → 21 ➡️
JsonSerializer 34.59μs 34.90μs +0.9% 3 → 3 ➡️
KafkaProducer produce 253.01μs 252.51μs -0.2% 1 → 1 ➡️
KafkaProducer sendMessage 305.34μs 311.35μs +2.0% 0 → 0 ➡️
PgOutputDecoder 77.18μs 78.88μs +2.2% 6 → 6 ➡️
getPartitionKeyValue boolean 13.61μs 13.53μs -0.6% 1 → 1 ➡️
getPartitionKeyValue integer 40.88μs 41.31μs +1.0% 3 → 3 ➡️
getPartitionKeyValue not found 0.03μs 0.03μs +0.0% 0 → 0 ⚪ noise
getPartitionKeyValue string 15.07μs 15.15μs +0.5% 1 → 1 ➡️
matchStreams found 14.97μs 15.12μs +1.0% 1 → 1 ➡️
matchStreams not found 0.14μs 0.04μs -69.6% 0 → 0 ⚪ noise

Summary: ➡️ 11 neutral · ⚪ 2 ignored (sub-μs)

Thresholds: <1μs ignore · 1–20μs 15% · 20–50μs 10% · ≥50μs 5%. Measured on a shared CI runner — treat small deltas as noise. Informational only; this check never fails the build.

@lukashes lukashes merged commit 251ad07 into main Jul 12, 2026
5 checks passed
@lukashes lukashes deleted the chore/log-level-tracing branch July 12, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant