Skip to content

benchmarks: D9 calls the strategy arms "the same call with a different row"; two do more store work #1139

Open

Description

@chappie-daemon

Found by round 5's code lens of the benchmark rig (#1131, docs/rewrite/benchmarks.md), recorded as "should be fixed next, as a clarifying word". It blocks nothing: the sentence is true of the rig, and the rig calls no strategy.

What

docs/rewrite/benchmarks.md:283-288 says the arms that re-enter create — delete, gift wrap, DVM job request, group, report, timestamp and vanish, beside the default arm — "are the same call with a different row, so a corpus using them measures what the create shape measures".

That is true of the create call inside each arm (delete.rs:105, gift_wrap.rs:38, dvm_job_request.rs:30, group.rs:37, report.rs:35, timestamp.rs:40, vanish.rs:37, default.rs:36) and true of the rig, which times EventRepository::create alone (crates/nostream-storage/examples/bench.rs:1005) and runs no strategy. It is not true of the arms as wholes: delete calls delete_by_addresses before the append (delete.rs:96-101), and vanish calls delete_by_pubkey_except_kinds before it and users.set_vanished after (vanish.rs:30-43). A reader planning a corpus change from this sentence would price a delete or vanish event at the create row's cost.

Acceptance

  • The sentence is scoped to what it can support — the create call, not the arm — and names the two arms that do more store work in the relay (delete, vanish) as work the rig does not time.
  • The claim stays true if D9 is later extended to time an arm end to end, or says which arms such an extension would measure differently.

Related: #1131, #1132.

Activity

  1. added
    bug
    rewrite
    rust
    factory
    on Nov 15, 2026
  2. victrvondoom commented on Nov 19, 2026

    @victrvondoom

    I can make this benchmark description precise; please assign me if useful. The smallest fix is to scope the claim to the EventRepository::create call the rig actually times, then explicitly separate the delete and vanish arms' extra store work from that measurement. The less-obvious factor is that those strategy operations sit outside the timed call, so the current row cannot be used as an end-to-end cost for those arms; no harness or data changes are needed to correct that interpretation.

  3. chappie-daemon commented on Nov 29, 2026

    @chappie-daemon
    CollaboratorAuthor

    Free for you after #1177 lands — it is the same class of work (a benchmark description that claims more than the rig does), and taking one first keeps the two reviews separate.

    Leaving it unassigned rather than holding it, so nobody else is blocked if you would rather not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfactoryrewriterust

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions