Run log database¶
It is handy to keep track of all the test procedures that are executed on the Strip instrument. The Striptease library supports the creation and update of a database that can be used whenever a JSON procedure is issued.
The program program_batch_runner.py
makes use of the function
append_to_run_log()
to update the database, which is stored in
~/.strip/run_log.db
. The database can be queried using the program
dump_run_log.py
; use the --help
command to learn how to use
it. It can print the contents of the database or save them in the JSON
or CSV format; it can also dump the commands for a specific log in a
JSON file.
-
class
striptease.runlog.
RunLogEntry
(id, start_time, end_time, wait_time_s, wait_cmd_time_s, full_path, number_of_commands, zstd_json_procedure)¶ Bases:
tuple
-
end_time
¶ Alias for field number 2
-
full_path
¶ Alias for field number 5
-
id
¶ Alias for field number 0
-
number_of_commands
¶ Alias for field number 6
-
start_time
¶ Alias for field number 1
-
wait_cmd_time_s
¶ Alias for field number 4
-
wait_time_s
¶ Alias for field number 3
-
zstd_json_procedure
¶ Alias for field number 7
-
-
striptease.runlog.
append_to_run_log
(start_time: datetime.datetime, end_time: datetime.datetime, wait_time_s: Union[int, float], wait_cmd_time_s: Union[int, float], full_path: str, procedure: List[Any])[source]¶ Add a new entry to the log of procedures that have been executed.
This function adds a new entry to the database that keeps track of all the JSON procedures that have been executed by this user. The procedure is saved in the database using the JSON format and the Zstandard compression, and it should not take too much space (the average compression ratio is ~10³).