feat: 调整状态推送

This commit is contained in:
chaos-zhu
2026-01-28 22:59:16 +08:00
parent 382fe7b932
commit 131d575e85
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1027,9 +1027,9 @@ module.exports = (httpServer) => {
collectData()
// 每n秒收集一次数据
monitorTimer = setInterval(collectData, 2500)
monitorTimer = setInterval(collectData, 2000)
// 每n秒发送一次数据
sendDataTimer = setInterval(sendData, 2000)
sendDataTimer = setInterval(sendData, 1500)
}
socket.on('disconnect', (reason) => {
@@ -266,7 +266,7 @@ const isConnecting = ref(false)
// 数据陈旧检测相关
const dataHistory = ref([]) // 记录最近的数据快照
const staleDataThreshold = 3 // 连续n次相同数据触发重连
const staleDataThreshold = 10 // 连续n次相同数据触发重连
// 网速图表相关
const networkChart = ref(null) // canvas元素引用