Document benchmark command in README · Entire
Document benchmark command in README
2b415ac→main·
Soph·3mo ago·1 file·+28 added/-0 removed
Sessions
9d63d45b98e8View transcript
[?
Can you take a look at the go code (wasm) in /Users/soph/Work/entire/devenv/entire-io-worktree1 based a bit on that I wonder if something like this can be build:Codex·GPT-5.4·1 step](/content/gh/entireio/git-sync/session/019d6d29-8cf7-7fe3-adc9-8c3e4d9d5603#timeline-9d63d45b98e8/index.html)
Changes
1
- MREADME.md+28
14 unmodified lines
15
16
17
18
19
20
21
103 unmodified lines
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
14 unmodified lines
- `git-sync bootstrap`: seed an empty target with create-only relay behavior
- `git-sync plan`: compute source-to-target ref actions without pushing
- `git-sync sync`: execute the planned changes against the target
- `git-sync-bench`: run repeatable benchmark scenarios against fresh empty targets
## Current scope
103 unmodified lines
That is the intended way to compare the bootstrap relay path against the normal sync path on the same fixture or test repo.
For repeated benchmark runs, prefer the dedicated benchmark command instead of manually wrapping `git-sync` invocations:
```bash
go run ./cmd/git-sync-bench \
--scenario bootstrap \
--source-url /tmp/git-sync-bench/kubernetes.git \
--repeat 3 \
--batch-max-pack-bytes 104857600 \
--stats \
--json
```
`git-sync-bench` creates a fresh bare target repository for each run, executes the selected scenario in-process, and reports:
- per-run wall-clock time
- per-run `syncer.Result`
- aggregate min/avg/max wall time
- aggregate internal elapsed and heap metrics from `--measure-memory`
- relay modes observed across successful runs
If `--source-url` is a local path, it is converted to `file://...` automatically. The current scenarios are:
- `--scenario bootstrap`
- `--scenario sync`
For large-repo measurements, use a local bare mirror as the source so the benchmark reflects `git-sync` behavior rather than internet variance. See [docs/benchmarking.md](/Users/soph/Work/entire/devenv/git-sync/docs/benchmarking.md) for details.
`plan` and `sync` JSON output also include `relay`, `relay_mode`, and `relay_reason` so automation can tell whether a relay path was chosen and why.
When `sync` sees that all managed target refs are absent and the run is compatible with bootstrap semantics, it automatically uses the bootstrap relay path instead of the normal decode-and-repack sync path.
```