Collecting redis stats (#3149)

This commit is contained in:
andrew clark
2025-11-04 19:55:11 -07:00
committed by GitHub
parent 930423ab3b
commit 3b076b0b74

View File

@@ -52,5 +52,22 @@ if [ "${ENFORCE_REDIS}" == "true" ]; then
fi
setup_rocm_compilers_hash_file
$SCCACHE_BIN --version
echo "=== Starting sccache server at $(date) ==="
$SCCACHE_BIN --start-server
# Log initial sccache statistics
echo "=== Initial sccache statistics ==="
$SCCACHE_BIN --show-stats || echo "Could not get initial stats"
# Test Redis connectivity and performance
echo "=== Testing Redis connectivity ==="
start_time=$(date +%s%N)
redis-cli -u ${SCCACHE_REDIS} ping || echo "Redis ping failed"
end_time=$(date +%s%N)
latency=$(( (end_time - start_time) / 1000000 ))
echo "Redis ping latency: ${latency}ms"
# Check Redis memory status
echo "=== Redis memory status ==="
redis-cli -u ${SCCACHE_REDIS} info memory | grep -E "(used_memory|maxmemory|evicted_keys)" || echo "Could not get Redis memory info"