TLS Canary collects all run log data in `~/.tlscanary/log`. The format is somewhat JSONny, but heavily compressed
to save disk space. Canary logs can get very big very fast when a run returns many results.
Here are some usage examples how to interact with TLS Canary's run log database:
```bash
# List all logs in database, including incomplete ones markes with (*)
tlscanary log
# List and then delete incomplete logs
tlscanary log -i incomplete
tlscanary log -i incomplete -a delete # just a dry-run
tlscanary log -i incomplete -a delete --really
# Print complete regression logs as JSON array to terminal
tlscanary log -i regression -e incomplete -a json
# Print JSON report of the last two runs to terminal
tlscanary log -i 2 -a json
# Create an HTML report in /tmp/report for completed regression runs
tlscanary log -i regression -e incomplete -a htmlreport -o /tmp/report
```
### Canary run modes
Run modes are specified via the mandatory positional `mode` parameter. See `tlscanary <mode> --help` for mode-specific
arguments.
Mode | Description
-----|-----
log | Performs various actions on run logs collected by performance, regression, and scan runs. See `tlscanary log --help`.
performance | Runs a performance analysis against the hosts in the test set. Use `--scans` to specify how often each host is tested.
regression | Runs a TLS regression test, comparing the 'test' candidate against the 'baseline' candidate. Only reports errors that are new to the test candiate. No error generated by baseline can make it to the report.
scan | This mode only collects connection state information for every host in the test set.
srcupdate | Compile a fresh set of TLS-enabled 'top' sites from the *Umbrella Top 1M* list. Use `-l` to override the default target size of 500k hosts. Use `-x` to adjust the number of passes for errors. Use `-x1` for a factor two speed improvement with slightly less stable results. Use `-b` to change the Firefox version used for filtering. You can use `-s` to create a new database, but you can't make it the default. Databases are written to `~/.tlscanary/sources/`.
### Command line arguments for test runs
The run modes `performance`, `regression`, and `scan` share a common set command line arguments:
Argument | Choices / **default** | Description
----------|----------|----------
-b --base | **release**, nightly, beta, aurora, esr, *build tree*, *package file* | Baseline test candidate to test against. Only used by comparative test modes.
-d --debug | | Enable verbose debug logging to the terminal
-f --filter | 0, **1** | The default filter level 1 removes network timeouts from reports which may appear spuriously. Filter level 0 applies no filtering.
-h --help | | Longer usage information
-j --parallel | 4 | Number of parallel firefox worker instances the host set will be distributed among
-l --limit | | The number of hosts in the test set is limited to the given number. The default is to scan all the hosts in the set.
-m --timeout | 10 | Request timeout in seconds. Running more requests in parallel increases network latency and results in more timeouts.
-n --requestsperworker | 50 | Chunk size of hosts that a worker will query in parallel.
-o --onecrl | **production**, stage, custom | OneCRL revocation list to install to the test profiles. `custom` uses a pre-configured, static list.
-s --source | **top**, list, ... | Set of hosts to run the test against. Pass `list` to get info on available test sets.
-t --test | release, **nightly**, beta, aurora, esr, *build tree*, *package file* | Specify the main test candidate. Used by every run mode.
-w --workdir | **~/.tlscanary** | Directory where cached files and other state is stored
-x --scans | 3 | Number of scans to run against each host during performance mode. Currently limited to 20.
MODE | performance, regression, scan, srcupdate | Test mode to run, given as positional parameter. This is a mandatory argument.