优化仪表板页面的指标获取频率,将定时器间隔从1000毫秒调整为3000毫秒,以减少请求频率并提高性能。

This commit is contained in:
wood chen 2025-03-16 11:54:32 +08:00
parent e98b2c3efe
commit 9c2bc25bfa

View File

@ -98,7 +98,7 @@ export default function DashboardPage() {
useEffect(() => {
fetchMetrics()
const interval = setInterval(fetchMetrics, 1000)
const interval = setInterval(fetchMetrics, 3000)
return () => clearInterval(interval)
}, [fetchMetrics])