Skip to content

Expose a public write surface for external tooling (benchmarks need the interceptor) #16

Description

@jakezwang

The new benchmark suite (https://github.com/argon-lab/benchmarks) measures branch creation, time-travel, snapshots, and storage cost through pkg/walcli — but two planned suites are blocked because external modules cannot reach any write path:

  1. Per-operation write throughputinternal/driver/wal.Interceptor has exactly the right surface (InsertOne/UpdateMany/... with real results), but internal/ is unreachable from outside and walcli.Services does not expose a constructor for it.
  2. Storage amplification under divergence — creating N branches that each modify δ% of documents requires branch writes, same blocker. (ImportService.ImportDatabase takes an internal options type, so import can't be driven programmatically from outside either; the benchmark shells out to the CLI for seeding as a workaround.)

Suggested minimal surface, either works:

  • walcli.Services.NewInterceptor(projectID, branchID string) (*driverwal.Interceptor, ...) returning the concrete type (callers can hold and use values of internal types; they just can't import the package), or
  • a small exported wrapper in pkg/ with basic-typed signatures.

Also worth exporting an ImportOptions equivalent while at it.

Context: the benchmark repo is now the gate for every published performance number (see its README). The write-path suites land there as soon as this surface exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions