warm-worktrees 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/BENCHMARKS.md +179 -0
  2. package/GUIDE.md +343 -0
  3. package/LICENSE.md +21 -0
  4. package/README.md +79 -2
  5. package/bench/results/adobe.json +1739 -0
  6. package/bench/results/build-lifecycle.json +1618 -0
  7. package/bench/results/cache-selection.json +3155 -0
  8. package/bench/results/cache-tuning.json +1554 -0
  9. package/bench/results/cargo-cache-scans.json +522 -0
  10. package/bench/results/cargo-snapshot-storage.json +1068 -0
  11. package/bench/results/checkout-selection.json +157 -0
  12. package/bench/results/compiler-seeds.json +634 -0
  13. package/bench/results/concurrent-publication.json +7999 -0
  14. package/bench/results/directory-export.json +4501 -0
  15. package/bench/results/firefox-checkout-control.json +4160 -0
  16. package/bench/results/four-worktrees.json +594 -0
  17. package/bench/results/incremental-cache-directories.json +555 -0
  18. package/bench/results/ninja.json +2133 -0
  19. package/bench/results/output-delivery.json +719 -0
  20. package/bench/results/per-checkout-archives.json +7044 -0
  21. package/bench/results/pool-maintenance.json +447 -0
  22. package/bench/results/rebuild-latency.json +138 -0
  23. package/bench/results/seed-scenarios.json +295 -0
  24. package/bench/results/snapshot-reclamation.json +885 -0
  25. package/bench/results/snapshot-writers.json +46 -0
  26. package/bench/results/source-mirror.json +150 -0
  27. package/bench/results/startup.json +703 -0
  28. package/bench/results/swift-scenarios.json +173 -0
  29. package/bench/results/upstream/firefox-ios.json +2395 -0
  30. package/bench/results/upstream/ripgrep.json +3275 -0
  31. package/bench/results/upstream/swift-syntax.json +2305 -0
  32. package/bench/results/upstream/vscode-seeded.json +3181 -0
  33. package/bench/results/upstream/vscode.json +2121 -0
  34. package/dist/Commander-LICENSE +22 -0
  35. package/dist/JSON5-LICENSE +23 -0
  36. package/dist/Zod-LICENSE +21 -0
  37. package/dist/benchmark.js +289 -0
  38. package/dist/cli.js +18337 -0
  39. package/dist/warm-copy.node +0 -0
  40. package/docs/assets/worktrees-cargo.png +0 -0
  41. package/package.json +55 -4
  42. package/profiles.json5 +82 -0
@@ -0,0 +1,46 @@
1
+ {
2
+ "project": "Synthetic build cache",
3
+ "date": "2026-11-29",
4
+ "toolchain": {
5
+ "macOS": "27.2.1",
6
+ "node": "v26.13.1"
7
+ },
8
+ "warmBundleSha256": {
9
+ "before": "6c8cda645ef1f83e992e46b91d771904d13a1ac32e95e344b575db96dd9aa50a",
10
+ "after": "e99a1c667de552991b7d5f16e1f0ca74207478486f7f39e0e037df769563b833"
11
+ },
12
+ "workload": "Each of three directories on APFS has two explicit seed paths. One holds 512 small object files across eight subdirectories and the other holds a single product. Each directory has its own files and inodes.",
13
+ "method": "Each pair uses separate fixtures for the two Warm bundles. We prime the store from a chosen directory and edit the product in the first directory. We then hold the writer lock while the first directory stages its publication. We release the lock as soon as staging finishes and wait for publication and cleanup. Odd rounds run the older bundle first. Even rounds reverse the order.",
14
+ "timing": "Elapsed milliseconds rounded to the nearest millisecond from entry into snapshotCaches until it returns. The harness exposes that function from each bundle in place of the CLI entry point. Lock acquisition by the harness, priming, fixture setup and the product edit happen before timing starts. There is no compiler in this trial.",
15
+ "verification": "Each call completed. We counted the staged cache directories before the writer could publish. A separate integration test pruned the prior snapshot while a publisher waited and checked that the next fresh worktree restored the edited product and the unchanged cache.",
16
+ "cases": [
17
+ {
18
+ "lastPublisher": "The same directory",
19
+ "beforeStagedEntriesPerRound": 2,
20
+ "afterStagedEntriesPerRound": 1,
21
+ "medianBeforeMs": 100,
22
+ "medianAfterMs": 15,
23
+ "rounds": [
24
+ { "round": 1, "beforeMs": 103, "afterMs": 17 },
25
+ { "round": 2, "beforeMs": 100, "afterMs": 15 },
26
+ { "round": 3, "beforeMs": 98, "afterMs": 15 },
27
+ { "round": 4, "beforeMs": 92, "afterMs": 14 },
28
+ { "round": 5, "beforeMs": 114, "afterMs": 18 }
29
+ ]
30
+ },
31
+ {
32
+ "lastPublisher": "A different directory, alternating between the other two",
33
+ "beforeStagedEntriesPerRound": 2,
34
+ "afterStagedEntriesPerRound": 2,
35
+ "medianBeforeMs": 160,
36
+ "medianAfterMs": 143,
37
+ "rounds": [
38
+ { "round": 1, "beforeMs": 149, "afterMs": 130 },
39
+ { "round": 2, "beforeMs": 162, "afterMs": 135 },
40
+ { "round": 3, "beforeMs": 160, "afterMs": 143 },
41
+ { "round": 4, "beforeMs": 159, "afterMs": 164 },
42
+ { "round": 5, "beforeMs": 173, "afterMs": 151 }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "command": ["warm", "run", "--raw", "--", "/bin/cat", "warm-verify"],
3
+ "environment": {
4
+ "macOS": "27.2.1 (26B131)",
5
+ "architecture": "arm64",
6
+ "node": "26.13.1",
7
+ "filesystem": "APFS"
8
+ },
9
+ "method": "Each pair compares the previous mirror with the new file lookup and parallel hashing code in the same CLI bundle. Both runs start with a separate clone and an empty pool. The command reads an untracked file and we check its output after every run. Times include command startup and exit. The sync measurement comes from the Warm run report.",
10
+ "pairOrder": [
11
+ ["previous", "updated"],
12
+ ["updated", "previous"],
13
+ ["previous", "updated"]
14
+ ],
15
+ "workloads": {
16
+ "swift-bylaws": {
17
+ "repository": "https://github.com/theblixguy/swift-bylaws",
18
+ "revision": "271cb79888c7b01a3db0aa50ab5b166831c0fa37",
19
+ "trackedFiles": 1227,
20
+ "scenarios": {
21
+ "First build in a fresh checkout": {
22
+ "copied": 1228,
23
+ "unchanged": 0,
24
+ "previous": {
25
+ "elapsedMs": [886.82, 845.64, 839.24],
26
+ "syncMs": [629.2, 582.43, 574.11]
27
+ },
28
+ "updated": {
29
+ "elapsedMs": [805.55, 932.61, 642.99],
30
+ "syncMs": [493.68, 616.93, 366.6]
31
+ }
32
+ },
33
+ "Repeat without edits": {
34
+ "copied": 0,
35
+ "unchanged": 1228,
36
+ "previous": {
37
+ "elapsedMs": [371.01, 550.57, 400.22],
38
+ "syncMs": [120.76, 248.36, 119.29]
39
+ },
40
+ "updated": {
41
+ "elapsedMs": [365.27, 393.28, 353.93],
42
+ "syncMs": [102.63, 94.93, 83.84]
43
+ }
44
+ },
45
+ "Edit the input and rebuild": {
46
+ "copied": 1,
47
+ "unchanged": 1227,
48
+ "previous": {
49
+ "elapsedMs": [370.83, 512.33, 528.39],
50
+ "syncMs": [126.03, 173.55, 122.92]
51
+ },
52
+ "updated": {
53
+ "elapsedMs": [318.48, 329.35, 308.58],
54
+ "syncMs": [91.97, 98.36, 91.1]
55
+ }
56
+ },
57
+ "Repeat after the edit": {
58
+ "copied": 0,
59
+ "unchanged": 1228,
60
+ "previous": {
61
+ "elapsedMs": [361.41, 353.45, 375.57],
62
+ "syncMs": [129.36, 121.2, 120.23]
63
+ },
64
+ "updated": {
65
+ "elapsedMs": [342.59, 334.48, 338.2],
66
+ "syncMs": [93.94, 99.61, 94.99]
67
+ }
68
+ },
69
+ "Switch worktrees and edit the input": {
70
+ "copied": 1,
71
+ "unchanged": 1227,
72
+ "previous": {
73
+ "elapsedMs": [791.82, 485.25, 609.08],
74
+ "syncMs": [506.67, 262.23, 309.6]
75
+ },
76
+ "updated": {
77
+ "elapsedMs": [341.89, 339.47, 593.27],
78
+ "syncMs": [114.49, 115.59, 111.07]
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "dense": {
84
+ "fixture": "4096 regular files in one directory. Each contains the text “sample file” followed by a newline.",
85
+ "trackedFiles": 4096,
86
+ "scenarios": {
87
+ "First build in a fresh checkout": {
88
+ "copied": 4097,
89
+ "unchanged": 0,
90
+ "previous": {
91
+ "elapsedMs": [1396.04, 1445.49, 1486.45],
92
+ "syncMs": [1139.86, 1178.78, 1234.11]
93
+ },
94
+ "updated": {
95
+ "elapsedMs": [1049.61, 980.11, 1788.72],
96
+ "syncMs": [773.91, 679.9, 780.96]
97
+ }
98
+ },
99
+ "Repeat without edits": {
100
+ "copied": 0,
101
+ "unchanged": 4097,
102
+ "previous": {
103
+ "elapsedMs": [317.0, 420.48, 396.65],
104
+ "syncMs": [70.34, 114.82, 107.32]
105
+ },
106
+ "updated": {
107
+ "elapsedMs": [413.8, 493.72, 794.44],
108
+ "syncMs": [88.71, 110.64, 71.22]
109
+ }
110
+ },
111
+ "Edit the input and rebuild": {
112
+ "copied": 1,
113
+ "unchanged": 4096,
114
+ "previous": {
115
+ "elapsedMs": [297.24, 488.01, 296.34],
116
+ "syncMs": [73.04, 183.23, 75.06]
117
+ },
118
+ "updated": {
119
+ "elapsedMs": [301.1, 419.46, 1076.4],
120
+ "syncMs": [77.58, 89.4, 282.4]
121
+ }
122
+ },
123
+ "Repeat after the edit": {
124
+ "copied": 0,
125
+ "unchanged": 4097,
126
+ "previous": {
127
+ "elapsedMs": [286.54, 1250.14, 285.73],
128
+ "syncMs": [67.11, 324.23, 66.03]
129
+ },
130
+ "updated": {
131
+ "elapsedMs": [310.88, 298.43, 564.64],
132
+ "syncMs": [73.37, 72.61, 333.7]
133
+ }
134
+ },
135
+ "Switch worktrees and edit the input": {
136
+ "copied": 1,
137
+ "unchanged": 4096,
138
+ "previous": {
139
+ "elapsedMs": [719.67, 908.45, 999.54],
140
+ "syncMs": [448.43, 678.23, 736.37]
141
+ },
142
+ "updated": {
143
+ "elapsedMs": [365.69, 359.58, 371.86],
144
+ "syncMs": [145.59, 136.67, 145.25]
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }