Skip to content

Commit 4e4f754

Browse files
sourcehawkclaude
andcommitted
fix(skills/bounding-heavy-commands): measure a command that reuses its own output at one row only
--measure-rows runs a command once for each row, one after the other. A build, a generator, or an install reuses the output of the run before, so its smaller rows did less work and recorded a peak that was too small. Such a command now gets the row at half only, like a command with self-bound none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2cc67eb commit 4e4f754

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎skills/bounding-heavy-commands/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The measured run is a real run of the command. Its result counts, also when the
124124

125125
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.
126126

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.
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. A command whose next run reuses the output of the run before, such as a build or a generator with a cache, also gets the row at half only: its later rows would do less work and measure a peak that is too small.
128128
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 and no other command of the line, 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:
129129

130130
```

0 commit comments

Comments
 (0)