summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorAnders Björklund <anders@itension.se>2015-09-25 19:22:44 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-07-21 21:40:07 +0200
commit0769ea3630efd6315303f7325fc16d73a0ef1a4d (patch)
tree5eb3a6200269b8958c9f1a4216440c2155c03da0 /test.sh
parent5fdb77458a0d34a4d24e2ca82138197bcd083685 (diff)
downloadccache-0769ea3630efd6315303f7325fc16d73a0ef1a4d.tar.gz
Count the number of cleanups performed, in stats
When running a busy ccache, it is useful to keep track of the number of cleanups performed to know when you need to increase the cache size. The number shown is actually the number of subdirectories, so when you do a full cleanup the counter usually increases by 16 (not just 1).
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/test.sh b/test.sh
index 29a0e1ac..9aeeee3c 100755
--- a/test.sh
+++ b/test.sh
@@ -2030,6 +2030,7 @@ cleanup_suite() {
checkfilecount 0 '*.d' $CCACHE_DIR
checkfilecount 0 '*.stderr' $CCACHE_DIR
checkstat 'files in cache' 0
+ checkstat 'cleanups performed' 1
testname="forced cleanup, no limits"
$CCACHE -C >/dev/null
@@ -2040,6 +2041,7 @@ cleanup_suite() {
checkfilecount 10 '*.d' $CCACHE_DIR
checkfilecount 10 '*.stderr' $CCACHE_DIR
checkstat 'files in cache' 30
+ checkstat 'cleanups performed' 0
testname="forced cleanup, file limit"
$CCACHE -C >/dev/null
@@ -2052,6 +2054,7 @@ cleanup_suite() {
checkfilecount 7 '*.d' $CCACHE_DIR
checkfilecount 7 '*.stderr' $CCACHE_DIR
checkstat 'files in cache' 21
+ checkstat 'cleanups performed' 1
for i in 0 1 2 3 4 5 9; do
file=$CCACHE_DIR/a/result$i-4017.o
if [ ! -f $file ]; then
@@ -2081,6 +2084,7 @@ cleanup_suite() {
checkfilecount 3 '*.d' $CCACHE_DIR
checkfilecount 3 '*.stderr' $CCACHE_DIR
checkstat 'files in cache' 9
+ checkstat 'cleanups performed' 1
for i in 3 4 5; do
file=$CCACHE_DIR/a/result$i-4017.o
if [ ! -f $file ]; then
@@ -2112,6 +2116,7 @@ cleanup_suite() {
checkfilecount 156 '*.d' $CCACHE_DIR
checkfilecount 156 '*.stderr' $CCACHE_DIR
checkstat 'files in cache' 469
+ checkstat 'cleanups performed' 1
testname="sibling cleanup"
$CCACHE -C >/dev/null