archiver_test.cli#
Command line interface for archiver test.
Module Contents#
Functions#
|
Turn on DEBUG logs, if asked otherwise INFO default |
|
Async main, runs the tests and prints the outputs. |
|
Archiver Test checks the data from two archivers |
|
Runs a single test given input options |
|
Loads a file CONFIG of test sets in json. |
Attributes#
- archiver_test.cli._handle_debug(_ctx: click.core.Context | None, _param: click.core.Option | click.core.Parameter | None, debug: bool | int | str) bool | int | str[source]#
Turn on DEBUG logs, if asked otherwise INFO default
- async archiver_test.cli.async_main(test_sets: list[archiver_test.archivers_test_set.ArchiversTestSet], output_folder: pathlib.Path | None) int[source]#
Async main, runs the tests and prints the outputs.
- Parameters:
test_sets – ArchiverTestSets to run.
output_folder – Optional input to store the data from the tests.
- archiver_test.cli.cli(_ctx: click.core.Context) None[source]#
Archiver Test checks the data from two archivers to see the difference when querying for the same data.
Example test the PV DTL-010:EMR-TT-047:Temp for the last 20 seconds.
archiver_test test -p DTL-010:EMR-TT-047:Temp -o archiver-linac-01.tn.esss.lu.se -n skybrewer.cslab.esss.lu.se -s 20 -t "sky archiver vs linac 01"Importing from a configuration file:
archiver_test load config.jsonOutputting to a configuration file and to a json storage:
archiver_test test --output-folder outputA copy of the downloaded data will be stored in output/store/archiver_host_name/pv_name/time_period.test_state.test_run_time.pickle and a copy of the config as output/test_name-test_run_time.test_state.pickle.
Loading existing data from another test run:
archiver_test test --old_data output/store/archiver-linac-01.tn.esss.lu.se/DTL-010:EMR-GT-003:Pos/data.pickleOutput is presented as a list of a tables for each PV for each archiver. Including:
Archival parameters
Average mean
Number of test events
PASS or FAIL if the returned events are exactly the same.
Possible reason why results could be different.
And a summary table with all with a calculated average mean difference.