debuginfod: sqlite3 metrics
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 24 Nov 2020 00:58:10 +0000 (19:58 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 26 Nov 2020 00:42:10 +0000 (19:42 -0500)
commitba6499984c2202e339e82420090cc9fc443ed8f2
tree519849283041af43648538b0bfa56b946be820d9
parent64dc5374b7e12a1ee95af6e1e91249dc2410878b
debuginfod: sqlite3 metrics

Add metrics for tracking sqlite3 error counts and query performance.

The former looks like a new sibling of the "error_count" family, and
is tested by dd-corrupting a live database file then triggering some
debuginfod activity.

    error_count{sqlite3="file is not a database"} 1

The latter looks like _count/_sum pairs for each type of sqlite
prepared-statement used in the code, and is grep smoke-tested.  They
should assist a sysadmin in tuning db storage.  This example shows a
6.4 ms/operation cost:

    sqlite3_milliseconds_count{step-done="rpm-file-intern"} 318
    sqlite3_milliseconds_sum{reset="rpm-file-intern"} 2033

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx
tests/ChangeLog
tests/run-debuginfod-find.sh