You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bench: rename projects to role-based names (NuGet/Current)
After the baseline moved to 9.0.0, a project named Benchmarks.V8
containing the v9 package was a lie waiting to confuse someone. The
names now state roles, not versions:
- Benchmarks.V8 -> Benchmarks.NuGet (the published baseline package)
- Benchmarks.V9 -> Benchmarks.Current (this source tree)
- Benchmarks.YetAnother unchanged (third-party yardstick)
Assembly names, build.fsx, benchmark.yml, comments and READMEs follow;
the historical v8-vs-v9 result tables keep their version labels.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ Local Loki + Grafana for manual testing: `docker compose up -d loki` (Loki on :3
67
67
68
68
-**Unit tests** (`tests/...UnitTests`, xUnit + **Unquote**`test <@ ... @>` assertions, all 3 TFMs): wire-format tests assert on exact serialized JSON captured via fake handlers/loopback; `AppSettingsBindingTests` builds a logger from JSON config to pin the appsettings contract; `ExtensionDefaultsTests` guards default-value drift.
69
69
-**Integration tests** (`tests/...IntegrationTests`, net10.0 only): Testcontainers spins up a real Loki and queries pushed entries back. Fail fast without Docker — no skip logic. Not part of the FAKE `Default` chain.
70
-
-**Benchmarks** (`benchmarks/`): three BenchmarkDotNet executables — V9 = this source (ProjectReference), V8 = the published NuGet baseline (pin via `BaselineVersion`/`VersionOverride`, default 9.0.0 — the "V8" name is historical), and Serilog.Sinks.Loki.YetAnother (yardstick) — sharing sources from `benchmarks/Shared/`. Deliberately **not in the .slnx** (each pins a conflicting Serilog/sink closure with the same assembly name). `Allocated` is the deterministic CI regression signal; `Mean` is noisy. `compare-results.fsx` diffs two result dirs (used by `.github/workflows/benchmark.yml` for PR comparisons against the latest NuGet version).
70
+
-**Benchmarks** (`benchmarks/`): three BenchmarkDotNet executables — `Current` = this source (ProjectReference), `NuGet` = the published baseline (pin via `BaselineVersion`/`VersionOverride`, default 9.0.0; CI moves it to the latest same-major release), and `YetAnother` (third-party yardstick) — sharing sources from `benchmarks/Shared/`. Deliberately **not in the .slnx** (each pins a conflicting Serilog/sink closure with the same assembly name). `Allocated` is the deterministic CI regression signal; `Mean` is noisy. `compare-results.fsx` diffs two result dirs (used by `.github/workflows/benchmark.yml` for PR comparisons against the latest NuGet version).
Copy file name to clipboardExpand all lines: benchmarks/README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# Benchmarks — V8 vs V9 vs YetAnother
1
+
# Benchmarks — NuGet baseline vs current source vs YetAnother
2
2
3
3
BenchmarkDotNet suites comparing three Grafana Loki sinks:
4
4
5
5
| Project | Package | Notes |
6
6
|---|---|---|
7
-
|`…Benchmarks.V8`|`Serilog.Sinks.Grafana.Loki` (NuGet, `BaselineVersion`, default **9.0.0**) | the published **baseline**; CI moves it to the latest same-major release on NuGet |
8
-
|`…Benchmarks.V9`| this repo (`../src`, `ProjectReference`) | the current **source**; streams JSON **bytes** through a pooled `Utf8JsonWriter`|
7
+
|`…Benchmarks.NuGet`|`Serilog.Sinks.Grafana.Loki` (NuGet, `BaselineVersion`, default **9.0.0**) | the published **baseline**; CI moves it to the latest same-major release on NuGet |
8
+
|`…Benchmarks.Current`| this repo (`../src`, `ProjectReference`) | the current **source**; streams JSON **bytes** through a pooled `Utf8JsonWriter`|
9
9
|`…Benchmarks.YetAnother`|`Serilog.Sinks.Loki.YetAnother`**4.0.5** (NuGet) | third-party yardstick; Serilog 4.x, also a streaming "low-allocation" design |
10
10
11
-
> Until v9.0.0 shipped, the baseline project compiled against the v8 API (hence its name) and
12
-
> pinned `8.3.2` — the result tables below are that release-time v8 → v9 comparison, kept as
13
-
> the historical record.
11
+
> Until v9.0.0 shipped, the baseline project compiled against the v8 API and pinned `8.3.2` —
12
+
> the result tables below are that release-time v8 → v9 comparison, kept as the historical
13
+
> record.
14
14
15
15
## Why three projects
16
16
17
-
V8 and V9 ship the **same** assembly name (`Serilog.Sinks.Grafana.Loki.dll`) and cannot
17
+
The NuGet and Current projects ship the **same** assembly name (`Serilog.Sinks.Grafana.Loki.dll`) and cannot
18
18
coexist in one process. Each contender therefore lives in its own executable;
19
19
BenchmarkDotNet runs each in isolation and the reports are merged below. The shared
20
20
workload, config and entry point live in `Shared/` and are linked into all three
@@ -25,7 +25,7 @@ projects, so every side measures byte-for-byte identical inputs.
25
25
-**Public API only, all sides.** Nothing reaches into internals. Each sink is driven
26
26
through its public configuration extension (`WriteTo.GrafanaLoki` / `WriteTo.Loki`).
27
27
-**Identical in-process transport.** Each sink exposes an HTTP injection point
28
-
(V9`httpMessageHandler`, V8 `ILokiHttpClient`, YetAnother `httpClient`). A fake drains
28
+
(NuGet/Current`httpMessageHandler`, YetAnother `httpClient`). A fake drains
29
29
the request body — forcing the real serialization to run — and returns `204` like Loki
30
30
on success. No sockets, no network variance. Set `LOKI_BENCH_TARGET` to hit a real Loki
31
31
instead (see below).
@@ -42,16 +42,17 @@ projects, so every side measures byte-for-byte identical inputs.
42
42
1.**`SinkBenchmarks`** — the full public pipeline (configure → write _N_ events → dispose
43
43
→ serialize + POST). The real production path, run for all three sinks.
Copy file name to clipboardExpand all lines: benchmarks/Serilog.Sinks.Grafana.Loki.Benchmarks.Current/Serilog.Sinks.Grafana.Loki.Benchmarks.Current.fsproj
Copy file name to clipboardExpand all lines: benchmarks/Serilog.Sinks.Grafana.Loki.Benchmarks.YetAnother/Serilog.Sinks.Grafana.Loki.Benchmarks.YetAnother.fsproj
0 commit comments