lib/commit: Add devino_cache_hits to txn stats

I found this useful while hacking on rpm-ostree but I think it might be
useful enough to upstream. This stat is really helpful for validating
that a pipeline is hitting the devino cache sweet spot.

Closes: #1772
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2018-11-05 14:08:54 +00:00
1 parent 1dcebe8846
commit 8eac5be030
4 files changed
+12 -2

No files matched your search

+2 -1
View File
@@ -117,9 +117,10 @@ assert_file_has_content ls.txt "^-006.. ${newuid} ${newgid} .*/baz/cow"
# But --devino-canonical should override that
$OSTREE commit ${COMMIT_ARGS} --owner-uid ${newuid} --owner-gid ${newgid} \
-I -b test2-devino-test --tree=dir=test2-checkout
-I -b test2-devino-test --table-output --tree=dir=test2-checkout > out.txt
$OSTREE ls test2-devino-test /baz/cow > ls.txt
assert_file_has_content ls.txt "^-006.. ${myuid} ${mygid} .*/baz/cow"
assert_file_has_content out.txt "Content Cache Hits: [1-9][0-9]*"
$OSTREE refs --delete test2-{linkcheckout,devino}-test
echo "ok commit with -I"