Skip to content

Commit 3b076b0

Browse files
authored
Collecting redis stats (#3149)
1 parent 930423a commit 3b076b0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

script/sccache_wrapper.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,22 @@ if [ "${ENFORCE_REDIS}" == "true" ]; then
5252
fi
5353
setup_rocm_compilers_hash_file
5454
$SCCACHE_BIN --version
55+
echo "=== Starting sccache server at $(date) ==="
5556
$SCCACHE_BIN --start-server
5657

58+
# Log initial sccache statistics
59+
echo "=== Initial sccache statistics ==="
60+
$SCCACHE_BIN --show-stats || echo "Could not get initial stats"
61+
62+
# Test Redis connectivity and performance
63+
echo "=== Testing Redis connectivity ==="
64+
start_time=$(date +%s%N)
65+
redis-cli -u ${SCCACHE_REDIS} ping || echo "Redis ping failed"
66+
end_time=$(date +%s%N)
67+
latency=$(( (end_time - start_time) / 1000000 ))
68+
echo "Redis ping latency: ${latency}ms"
69+
70+
# Check Redis memory status
71+
echo "=== Redis memory status ==="
72+
redis-cli -u ${SCCACHE_REDIS} info memory | grep -E "(used_memory|maxmemory|evicted_keys)" || echo "Could not get Redis memory info"
73+

0 commit comments

Comments
 (0)