blob: 91adbd3d8b38c104f90e091cdfae15b8e519991c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Report scripts
Portable POSIX-sh tooling to generate reports from the bats test suite. All
entrypoints run under mingw bash, WSL bash and Alpine/busybox ash, and depend
only on `bats`, `awk`, `sort` and coreutils.
## `profile-tests.sh`
Per-test timing (and optional per-line hotspots). See `doc/profiling.md`.
## `profile-run.sh`
Direct profiling for real `trbldoc.sh` invocations (outside bats). Produces:
- per-run wall-clock summary (`run-summary.csv`)
- line hotspots (`hotspots.html`)
- pipeline phase hotspots inferred from trace line ranges (`phase-hotspots.html`)
Example:
```sh
sh scripts/profile-run.sh -n 3 -C -- -s tests/fixtures/pipeline -o .trblcache/built
```
## `hotspot-tests.sh`
Repeatable hotspot analysis for the bats suite without relying on JUnit output.
It captures:
- per-test timing from raw `bats --timing` output
- line hotspots from xtrace logs
- optional phase hotspots for `trbldoc.sh` (when helper scripts are present)
```sh
sh scripts/hotspot-tests.sh -s all -n 30
```
## `coverage-tests.sh`
Shell line coverage of `trbldoc.sh`. See `doc/coverage.md`.
## `generate-reports.sh`
Run both into one timestamped `reports/` directory. Puts reports into a
`reports/run-<timestamp>/` directory.
```sh
sh scripts/generate-reports.sh -p
```
`lib/` holds shared helpers: `common.sh` (sh helpers), `trace-init.sh` (the
`BASH_ENV` xtrace hook), and the `*.awk` extractors/renderers.
|