libsir 2.2.6
Standard Incident Reporter
|
In order to ensure that libsir is working properly on your system, the first thing you should do after compilation is verify that the test suite runs successfully (in fact, we recommend making it part of your deployment workflow).
It will exit with 0
if all test(s) ran successfully and passed, or 1
if errors occurred/any test failed.
The simplest way to achieve this is simply to run build/bin/sirtests
from the root of the repository. You should see output similar to the following:
sirtests
has a command-line interface that allows you to control its behavior. For the current options, run sirtests --help
. You should see output similar to the following:
Of note here is the obvious one, --perf
. The perf test is only run if you explicitly specify this flag. It is a good way to ensure that libsir is compiled correctly for deployment in a production environment. If you get a very slow (or dubiously fast) result, you should re-examine your configuration.
The result includes a comparison to an equivalent raw printf
call for the same number of iterations. I expect this to always be faster than libsir for many reasons, but I have seen it beaten once.
Here is an example of the results of --perf
on this development machine (iMac Pro, 3.2GHz 8-core Xeon, 64GB 2666MHz DDR4, SSD):
The other useful flags include --list
and --only
if you wish to narrow down a problem test or set of tests. Please let us know if you think of additional tests that should be performed by opening a feature request.