OrmaosDocs

Reference

Recording files

The folder .ormaos/r<N>/ and its JSON lines files, in the provisional format provisional-0.

View as Markdown

The folder#

A recording is .ormaos/r<N>/ in the directory where the command ran, with N the next free number. .ormaos/ has its own .gitignore, which ignores everything in it. Ormaos sets no limit on the size of .ormaos/ and deletes nothing from it.

text
.ormaos/
  .gitignore
  r1/
    run.jsonl                 written by ormaos run, or by the block
    p<pid>-<time>.jsonl       one per Python process

run.jsonl#

Its first line has only core: what a recorder of any language would write.

FieldWhat
ormaosthe version that recorded
moderun for ormaos run, record for with ormaos.record():
commandthe command, by name and shape (see Shapes, not values)
cwdthe working directory
env_namesthe names of the environment variables, never their values
platformlinux
gitthe commit and whether there are uncommitted changes, as hashes and counts: no file name, no branch name, no content
onlythe capabilities asked for with --only, or null
valueswhether values were asked for
anchor{"t": 0, "unix": ..., "clock": "monotonic, nanoseconds"}

p<pid>-<time>.jsonl#

The first line of a process file has two parts:

  • core: the process (pid, ppid, cwd), the capabilities that were recorded (context, calls, exceptions, path, io, logs, dataframes, tensors, and values when the run asked for them), values (false, or what was recorded of them and how it was cut and masked), what is never recorded, and anchor.
  • python: what only this recorder knows: the version, the executable, how Python was started, whether the process was forked, the path scope.

Times#

Event times (t) are nanoseconds on a monotonic clock. anchor ties them to the wall clock: it says which moment t = 0 was.

Written while the program runs#

The recorder writes after every 256 records, when the oldest waiting record is 0.2 seconds old (checked when a record arrives), and when a call that has no call of your code above it starts or ends. Each write ends with a checkpoint: the calls that have not returned, the exceptions whose end is not known, and whether anything is still unwritten. So a recording can be read while the program is still running, and after kill -9; ormaos show then marks it (incomplete).