refactor(NetworkMapScheduler, NetworkMapDashboard): update speed test logic to ensure single test per server to avoid bandwidth contention
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m52s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m52s
This commit is contained in:
@@ -295,7 +295,12 @@ async function runJob(opts) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
await runWithOnePerKey(speedTasks, (i) => withSpeed[i].speedTestServerId);
|
||||
// В один момент — только один тест на один сервер назначения (удалённый конец туннеля),
|
||||
// иначе несколько замеров к одному хостингу делят канал и дают заниженные результаты
|
||||
await runWithOnePerKey(speedTasks, (i) => {
|
||||
const c = withSpeed[i];
|
||||
return c.speedTestServerId === c.fromKey ? c.toKey : c.fromKey;
|
||||
});
|
||||
}
|
||||
|
||||
await writeCache(pingMap, speedMap);
|
||||
|
||||
@@ -321,8 +321,12 @@ export default function NetworkMapDashboard() {
|
||||
}
|
||||
}
|
||||
});
|
||||
// На каждой ноде (speedTestServerId) в один момент — только один тест, чтобы не делить канал
|
||||
await runWithOnePerKey(tasks, (i) => withSpeed[i].speedTestServerId);
|
||||
// В один момент — только один тест на один сервер назначения (удалённый конец туннеля),
|
||||
// иначе несколько замеров к одному хостингу делят канал и дают заниженные результаты
|
||||
await runWithOnePerKey(tasks, (i) => {
|
||||
const c = withSpeed[i];
|
||||
return c.speedTestServerId === c.fromKey ? c.toKey : c.fromKey;
|
||||
});
|
||||
if (speedAbortRef.current) return;
|
||||
setSpeedLoading(false);
|
||||
}, [connections]);
|
||||
|
||||
Reference in New Issue
Block a user