(action: ProxyLatencyAction)
| 274 | }; |
| 275 | |
| 276 | const updateStoredLatencies = (action: ProxyLatencyAction): void => { |
| 277 | const latencies = loadStoredLatencies(); |
| 278 | const reports = latencies[action.proxyID] || []; |
| 279 | |
| 280 | reports.push(action.report); |
| 281 | latencies[action.proxyID] = reports; |
| 282 | localStorage.setItem("workspace-proxy-latencies", JSON.stringify(latencies)); |
| 283 | }; |
| 284 | |
| 285 | // garbageCollectStoredLatencies will remove any latencies that are older then 1 week or latencies of proxies |
| 286 | // that no longer exist. This is intended to keep the size of local storage down. |
no test coverage detected