KScript docs
EN

Timings

Timing tests, checks and servers

--timings works with kscript's own commands as well as with scripts. After a command, it may go anywhere:

Text
kscript test --all --timings tests.trace.json
kscript check --timings
kscript serve --timings serve.trace.json
  • kscript test times each test as a test, named as the test runner names it, with its file and line. Its functions and built-ins show up as they would in a script.
  • kscript check times each file as a file, with its analyse and lint phases.
  • kscript serve times each request as a request named by its method and path, such as GET /about. The summary prints when the server stops with Ctrl+C. Requests can overlap, so in a .trace.json file they sit on a timeline of their own, named requests.