/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v6.5.2
shared/engine/stats.tsx
27 строк
464 B
chrisnojima
dead code cleanup (#26280)
28 фев 2024, 22:39
Не верифицирован
28 фев 2024, 22:39
2314c3a
Код
Авторство
О чём код?
// RPC stats. const _stats: { eof: number in: {[method: string]: {count: number}} out: {[method: string]: {count: number}} } = { eof: 0, in: {}, out: {}, } export const gotStat = (method: string, incoming: boolean) => { const inKey = incoming ? 'in' : 'out' if (!_stats[inKey][method]) { _stats[inKey][method] = { count: 0, } } const i = _stats[inKey][method] i && i.count++ } export const gotEOF = () => { ++_stats.eof }