You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8fd82bd
Browse filesBrowse the repository at this point in the historyBrowse files
fix(skills/bounding-heavy-commands): show --memory for --measure-rows, and measure the rows that step 1 chose
The skill said that the largest row of --measure-rows runs with no --memory, but the wrapper takes a --memory for it, as its usage text shows. The whole-project line also told each command to use all, half, and a quarter of the processors, while step 1 gives a command with self-bound none the row at half only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|`--cpus <n>`| Processor limit, as a whole number. Taken from the record. |
44
44
|`--exclusive <name>`| A resource that only one command may hold at a time, such as a fixed port. You choose the name. The wrapper keeps the names of each repository apart, and all worktrees of one repository share them. Repeat the option for each resource. |
45
45
|`--measure`| Also print a suggested budget. Discovery uses it. With no `--memory`, the command runs alone in the queue. |
46
-
|`--measure-rows <n>,<n>,...`| Measure the command one time at each `--cpus` of the list, one after the other, the largest first. The largest runs with no `--memory`, so it runs alone in the queue. Each smaller one runs with `--memory` at the suggested budget of the one before it. When the one before it did not exit 0, the smaller one runs with the same `--memory` as that one. Use it in place of `--cpus` and `--measure`. A stop signal ends the list. The exit code is the first exit code of a row that is not 0. |
46
+
|`--measure-rows <n>,<n>,...`| Measure the command one time at each `--cpus` of the list, one after the other, the largest first. The largest runs with the `--memory` of the call. With no `--memory`, it runs alone in the queue. Each smaller one runs with `--memory` at the suggested budget of the one before it. When the one before it did not exit 0, the smaller one runs with the same `--memory` as that one. Use it in place of `--cpus` and `--measure`. A stop signal ends the list. The exit code is the first exit code of a row that is not 0. |
47
47
|`--label <name>`| A name for the row lines of a measurement, such as `unit-tests`. Use letters, digits, `.`, `_`, and `-`. It changes nothing else. |
48
48
49
49
The wrapper does four things in sequence. It waits for its turn in the queue. It waits until the memory of its budget is free. It runs the command. It prints the budget and the measured peak on the error stream. For the wait, the free memory is the memory that the machine has free now, less the part of their budgets that the running bounded commands do not use yet, less a headroom for the programs outside the queue. The headroom is a tenth of the memory of the machine, and at least 1 GiB. The budget and the headroom together never need more than the memory of the queue, so a budget of the whole queue does not wait for a headroom. The wait has no time limit: the command does not start before its memory is free, and the wrapper prints a line at intervals while it waits. Each line that the wrapper prints starts with `bounded-run:`. A measurement also prints one row line, in a fixed form:
@@ -125,7 +125,7 @@ The measured run is a real run of the command. Its result counts, also when the
125
125
When the record does not exist (§The record, case 5), do steps 1 to 3 for every heavy command of the project. Then measure them all in one run, in place of steps 4 and 5. Do not measure only the command that you need now. A command that gets its entry later gets its first measurement in the middle of someone's work, and that measurement holds the whole queue while other sessions wait.
126
126
127
127
1. Choose the rows. Measure each command at three `--cpus`: all the machine's processors, half of them, and a quarter of them. Round each one down, use at least 1, and drop a value that is the same as another. A command with `self-bound: none` gets the row at half only: nothing in it reads its `--cpus`, so each row would measure the same command.
128
-
2. Write one command line. For each command, write one call of the wrapper with `--measure-rows <all>,<half>,<quarter>`, a `--label` that names the command, the `--exclusive` options of the command, and its bounded command line. Join the calls with `;`, so that a measurement that fails does not stop the others. Write the path of the wrapper in full, so that the line runs in any shell. Run it from the root of the project:
128
+
2. Write one command line. For each command, write one call of the wrapper with `--measure-rows` and the rows that step 1 chose for it, a `--label` that names the command, the `--exclusive` options of the command, and its bounded command line. Join the calls with `;`, so that a measurement that fails does not stop the others. Write the path of the wrapper in full, so that the line runs in any shell. Run it from the root of the project:
129
129
130
130
```
131
131
python3 "<path of the wrapper>" --measure-rows 16,8,4 --label unit-tests -- <bounded command> ; python3 "<path of the wrapper>" --measure-rows 16,8,4 --label lint -- <bounded command>
0 commit comments