benchmarks

package
v1.54.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package benchmarks ports the dmonad/crdt-benchmarks B1-B4 workload suite to ygo. The benchmark IDs (B1.1 .. B4) match the upstream spec verbatim so cross-implementation comparison stays apples-to- apples — see README in https://github.com/dmonad/crdt-benchmarks for the canonical descriptions.

Methodology per benchmark:

  • "ops" sub-benchmark times the workload itself (mutations into a fresh Doc), no encode.
  • "encode_v1" / "encode_v2" sub-benchmarks time the wire encoder against a pre-built Doc; report doc-size in bytes via b.ReportMetric.
  • "parse_v1" / "parse_v2" sub-benchmarks time DecodeUpdate + Apply against a fresh receiver Doc.

Run: go test -bench=. -benchmem ./benchmarks/ Run one: go test -bench=B1_1 -benchmem ./benchmarks/

B4 expects the upstream automerge-paper trace at testdata/b4-trace.json.gz — skipped if absent. See testdata/gen/fetch-b4-trace.sh.

Index

Constants

View Source
const N = 6000

N is the canonical operation count per dmonad/crdt-benchmarks B1 workloads (6,000 ops). Kept as a const so all B1.x scenarios use the same scale for cross-comparison.

View Source
const N2 = N / 2

N2 is the per-peer op count for B2 concurrent workloads. Each of two peers does N2 ops, so total ops is 2*N2 = 6000 (matches B1).

View Source
const N3 = 489

N3 is the client count for B3 high-conflict workloads. Spec says "20 * sqrt(N)" where N=600 → 489 clients. We use the spec value directly rather than recomputing.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL