summaryrefslogtreecommitdiffhomepage
path: root/bench/run.sh
Commit message (Collapse)AuthorAgeFilesLines
* Measure why 64-bit start-up is slow, and record the answer (#16)Sean Kurtz5 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bench: time one start with a parent that is not an LE program `bench/startup.sh` times a shell loop, so on z/OS every child pays the 31-bit shell's own price and the 64-bit start-up cost cannot be separated from it. `tests/tools/spawn` forks one child at a time and reports wall and child CPU per start, and `bench/le-init.sh` builds the 31-bit, 64-bit and HLASM programs it times in a work directory, so the table needs nothing checked in but the script. The child's environment is built by hand and passed to `execve`: `putenv` after LE has initialized is not handed to the child, and `_CEE_RUNOPTS` exported to an LE parent makes that parent's `execl` fail, which a fork loop that does not check exit status reports as a fast start. * notes: the 64-bit start-up cost is LE waiting, not the address mode Measured on the CBT z/OS 29.00 system: a 64-bit HLASM program with no LE starts in 1.39 ms, the same source at -m32 in 1.5-1.8 ms, so the address space, the loader and XPLINK are free. A -m64 start spends 4.5-28 ms before the first instruction of main, of which only 1.0-1.25 ms is charged to the child: the rest is wall time on something shared, which does not overlap between concurrent starts while it is at 28 ms and does once it drops to 5.8 ms. No _CEE_RUNOPTS option moves it. That retracts an earlier POSIX(OFF) result in these notes: exporting the option to an LE parent makes its execl fail, so the run timed failed execs. Applied to the child, POSIX(OFF) changes nothing.
* bench: take a shell path that is relative to where run.sh was calledbench/startupSean Kurtz5 days1-0/+1
| | | | | The harness chdirs to a work directory, so `./zash`, the form the usage line shows, resolved to nothing.
* bench: measure start-up wall time against the other shellsSean Kurtz5 days1-1/+2
| | | | | | | | | | | run.sh times CPU, so the milliseconds a process spends before it runs anything never appear in it: zash can read 0.00 in a subshell row while zash -c : costs a few ms of wall time. bench/startup.sh measures that directly, one start per command, and bench/README.md now has a table instead of a warning that the number is missing. The clock is tests/tools/now.c, ten lines, because /bin/date on z/OS has no sub-second format.
* bench: keep a label with a space in one columnSean Kurtz6 days1-5/+6
|
* bench: label the z/OS baseline column "z/OS sh"Sean Kurtz6 days1-3/+3
|
* bench: name the columns, and run the ksh features against ksh88Sean Kurtz11 days1-10/+47
| | | | | | | | | | | | The column for z/OS /bin/sh said sh, which hid that it is IBM's ksh88 port, and two benchmarks skipped it for the wrong reason: dbracket probed [[ ]] with eval, which ksh88 rejects even though [[ ]] works, and arithcmd used (( )) as a command, which is ksh93 and not ksh88. run.sh now takes shell=label arguments and labels /bin/sh as ksh88 on z/OS, and BENCH selects a subset. dbracket probes the form it uses. arithcmd keeps to typeset -i, let and $(( )), so ksh88 runs it, and the (( )) command form moved to dparen.sh.
* bench: read every shell's times output, and feed scripts on stdinSean Kurtz12 days1-6/+20
| | | | | | | | z/OS `times` differs per shell (ksh88 `0m 1.16s`, bash `0m1.160s`, oksh `0m01.16s`), and the old parser assumed bash's shape, multiplying ksh88's seconds by 60. z/OS zsh cannot open an ASCII-tagged script by name, so benchmarks go in on stdin. The probe list also looks for zsh and oksh now.
* Tests and benchmarks for the extensions and the interactive layerSean Kurtz2026-11-131-2/+5
| | | | | | | | New zash/ tests for each extension, a proc/ test showing they create no processes, and linux/i-*.sh tests that drive the interactive shell on a pseudo-terminal (tests/tools/ptydrive.py; skipped without python3). The runner counts exit status 77 as "skipped". Adds a benchmark for the arithmetic commands and removes a stray file from tests/posix.
* zash: scripting core, test suite and benchmarksSean Kurtz2026-11-121-0/+50
A clean-slate POSIX shell for z/OS UNIX in the Almquist tradition, written in C23 for Clang (Linux) and IBM Open XL C/C++ (z/OS). - Parser, expansion, arithmetic, redirection, traps and builtins. - Spawn-first execution: fd plans instead of fork+dup2, in-shell pure builtins for pipelines and command substitution, $(a | b) without a subshell. - Flat .POSIX Makefile; asan, valgrind, bench, compdb and z/OS targets. - Tests: posix (dash-generated), zash, process accounting, linux, zos. Nothing has been compiled or run on z/OS yet.