Skip to content

perf: benchmark hot path and reduce logger dispatch overhead - #133

Merged
LimiNode merged 5 commits into
mainfrom
perf/benchmark-and-hotpath
Sep 12, 2026
Merged

perf: benchmark hot path and reduce logger dispatch overhead#133
LimiNode merged 5 commits into
mainfrom
perf/benchmark-and-hotpath

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • publish an immutable copy-on-write logger strategy snapshot to remove the per-call registry lock and temporary vector copy;
  • make enabled and single_mode atomic and add a concurrent hot-path regression test;
  • make async benchmark completion comparable: spdlog now waits for a worker-side flush marker, and the workload rejects incomplete sink delivery after adapter.flush();
  • use one explicit blocking queue capacity for both adapters and record it in CSV output;
  • reject zero queue capacity and refuse to append to an older latency CSV schema;
  • align benchmark methodology with the prepared-message/direct-dispatch contract, pin spdlog 1.17.0, use Release CI benchmarks, and mark the old fixture as legacy.

Validation

  • MSVC Release build of the C++17 benchmark targets, with the library core exercised by the C++11 matrix jobs;
  • logit_bench_flush_test passed with an async queue capacity of 8;
  • async null and file smoke runs passed for LogIt++ and spdlog;
  • queue-capacity and CSV-schema validation paths were checked locally;
  • fresh GitHub CI is green across Linux/Windows/macOS, C++11/17, ASAN/UBSAN, TSAN, MDBX, vcpkg, Emscripten, benchmark-asan, and the executed spdlog flush regression.

The PR intentionally does not claim a public LOGIT_INFO(...) benchmark or lock-elision for arbitrary custom backends. The legacy 2025 fixture is not presented as a current numeric comparison because its dependency/toolchain and async drain provenance were not recorded.

Publish an immutable copy-on-write strategy snapshot so normal and targeted dispatches avoid registry locking and per-call vector copies. Make logger state flags atomic and add a concurrent hot-path regression test without relaxing the existing formatter/backend execution mutex.

Align benchmark setup and documentation with the prepared-record pipeline, pin spdlog 1.17.0, use Release CI builds, add the 32-producer case, and label sink-entry latency accurately.
Add a worker-side flush generation barrier for the spdlog async adapter and fail the workload when adapter.flush() returns before recorded sink completions. Use one explicit blocking queue capacity for both adapters and record it in CSV output.

Add a focused spdlog flush regression executable and clarify the prepared-message contract and legacy fixture status in English and Russian benchmark documentation.
Build the spdlog flush barrier test into the benchmark output directory and run it in the Linux benchmark job so the worker-side drain contract is continuously exercised.
Build the dedicated spdlog flush barrier executable before running it in the benchmark workflow.
Reject zero comparative queue capacity instead of silently applying different LogIt++ and spdlog limits. Validate the latency CSV header before appending rows so legacy results cannot be mixed with the queue-capacity schema.
@LimiNode
LimiNode merged commit 0ea0f1e into main Sep 12, 2026
14 checks passed
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