Skip to content

docs(benchmarks): trim restating narration - #791

Merged
tylerkron merged 2 commits into
mainfrom
cursor/bench-trim-narration-930f
Sep 27, 2026
Merged

tylerkron merged 2 commits into
mainfrom
cursor/bench-trim-narration-930f

Conversation

@tylerkron

@tylerkron tylerkron commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The benchmark project's comments repeated the README, the workflow and the ticket history at length. This PR cuts them down to the reason behind each non-obvious choice. Only comments and the workflow header change. No benchmark logic, TFM, MSBuild property value or CI step changes.

  • Program.cs: drop the XML doc that restated the README and benchmarks.yml. The BenchmarkSwitcher one-liner stays.
  • Daqifi.Core.Benchmarks.csproj: one short comment per property.
    • TargetFramework: net10.0 only, so dotnet run -c Release needs no -f. For net9.0 numbers, add a SimpleJob rather than a second TFM.
    • IsPackable: this is a measuring instrument, not a shipped package. The property also keeps the Directory.Build.targets package metadata off the project, because that file is gated on IsPackable.
    • IsTestProject: explicitly not a test project, so dotnet test on the solution skips it.
  • ChannelScalingBenchmarks: shorten the class remark. It keeps the raw count to volts to engineering units mapping, the per-sample cost rationale, "neither should allocate", and why the channel lock is inside the measurement. The method summary that repeated the lock note is gone. The per-sample OperationsPerInvoke note, the pre-generated ADC counts, and the transducer/identity case notes stay.
  • StreamDecodeBenchmarks: drop the perf(streaming): steady-state decode allocates per frame what it could cache — channel snapshot+sort, double buffer copy, unconditional wrappers #490/test(flake): Record_AfterTheFirstSamplePerChannel_AllocatesNothing fails on a full net10 run, passes in isolation #531 retelling, which the README table already cites. These stay: the whole-path note (snapshot cache, timestamps, gap detection, unpacking, event dispatch), the per-frame OperationsPerInvoke note, the ~1.38 KB DataSample plus event-args sentence, and the DecodeCase monotonic-clock and 32-bit rollover remarks.
  • benchmarks.yml: the header is now two lines. It still says the workflow is on demand only and never runs on a pull request, because shared-runner timings are too noisy to gate a merge on (perf: no benchmark harness — nine perf tickets were measured by hand and nothing guards the wins #640), and it points to the README. The filter-injection comment is unchanged.

Note on IsTestProject

I checked this against the .NET 10.0.203 SDK's Microsoft.TestPlatform.targets. Without the property, the VSTest target already skips a project that lacks the test SDK: it logs a low-importance "Skipping running test for project" notice and never starts a test host. So the property is an explicit opt-out, and the comment now says that. The earlier wording claimed the property is what stops a test-host launch, which isn't true. BenchmarkProjectTests still pins the value.

Overlap with other open PRs

Test plan

  • Script check, origin/main against this branch. C# with comments stripped: identical token streams. csproj with comments dropped: identical XML trees. benchmarks.yml: yaml.safe_load output identical, and non-comment lines identical and in the same order. The checker does catch real changes: it flags bench: baseline DecodeRawAnalogFrame (AnalogInData) #787's code change and chore: GHA permissions/timeouts, Any-CPU-only solution, TFM comment #741's timeout-minutes.
  • dotnet build Daqifi.Core.sln -c Release: 0 warnings. Benchmark project --no-incremental: 0 warnings.
  • Daqifi.Core.Tests.Build tests (including BenchmarkProjectTests) pass on net9.0 and net10.0 (62 each).
  • CI green on this PR

🤖 Generated with Claude Code

Drop benchmark comments that repeat the README, the workflow, or old tickets. Keep the remarks that say why a number is a fair measurement.

Co-authored-by: Tyler Kron <tylerkron@gmail.com>
@tylerkron
tylerkron requested a review from a team as a code owner September 25, 2026 10:35
@qodo-code-review

qodo-code-review Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 7bd09c7 🚀 Fast

Results up to commit 1aed204 🚀 Fast


No changes from previous review

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Trim redundant benchmark narration

📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Removes benchmark comments that duplicate the README, workflow, or historical tickets.
• Preserves measurement rationale, project properties, benchmark behavior, and workflow execution.
High-Level Assessment

The current approach is optimal: retain concise rationale beside non-obvious benchmark choices while leaving broader operational and historical context in the README and workflow. This reduces documentation drift without changing behavior.

Files changed (5) +13 / -60

Documentation (5) +13 / -60
benchmarks.ymlCondense the manual-trigger workflow header +1/-6

Condense the manual-trigger workflow header

• Replaces the historical explanation with a one-line note that the benchmark workflow is dispatch-only. Workflow triggers, inputs, jobs, and steps remain unchanged.

.github/workflows/benchmarks.yml

ChannelScalingBenchmarks.csFocus scaling benchmark comments on measurement rationale +6/-18

Focus scaling benchmark comments on measurement rationale

• Shortens the class documentation to emphasize per-sample costs and why channel locking remains included. Removes a method summary that repeated the same lock rationale.

src/Daqifi.Core.Benchmarks/ChannelScalingBenchmarks.cs

Daqifi.Core.Benchmarks.csprojCondense benchmark project property comments +3/-14

Condense benchmark project property comments

• Shortens comments explaining the single target framework, non-packable status, and exclusion from test discovery. Property values and project behavior are unchanged.

src/Daqifi.Core.Benchmarks/Daqifi.Core.Benchmarks.csproj

Program.csRemove redundant benchmark entry-point documentation +0/-18

Remove redundant benchmark entry-point documentation

• Removes XML documentation that duplicated BenchmarkDotNet usage and workflow guidance already covered elsewhere. The BenchmarkSwitcher entry point remains unchanged.

src/Daqifi.Core.Benchmarks/Program.cs

StreamDecodeBenchmarks.csRemove historical ticket narration from decode benchmarks +3/-4

Remove historical ticket narration from decode benchmarks

• Drops issue-history details while retaining the allocation baseline and its DataSample and event-args sources. Benchmark methods and measurement semantics remain unchanged.

src/Daqifi.Core.Benchmarks/StreamDecodeBenchmarks.cs

Restore the reasons the trim dropped: why the benchmark workflow never runs
on a pull request, the SimpleJob route for net9.0 numbers, the
Directory.Build.targets effect of IsPackable=false, the unit mapping and
no-allocation expectation for the scaling benchmarks. Reword the
IsTestProject note: without it the VSTest target already skips the project
(with a low-importance notice), so the property is an explicit opt-out, not
what stops a test-host launch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tylerkron tylerkron changed the title bench: trim restating narration docs(benchmarks): trim restating narration Sep 27, 2026
@tylerkron

Copy link
Copy Markdown
Contributor Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 7bd09c7

@tylerkron

Copy link
Copy Markdown
Contributor Author

Qodo-clean, CI green — ready for review

@tylerkron
tylerkron added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit fec215e Sep 27, 2026
6 of 8 checks passed
@tylerkron
tylerkron deleted the cursor/bench-trim-narration-930f branch September 27, 2026 22:31
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.

2 participants