/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v6.6.2
shared/engine/stats.tsx
27 строк
459 B
chrisnojima
6.6.0 mergedown (#28393)
14 авг 2025, 18:46
Не верифицирован
14 авг 2025, 18:46
4c036e5
Код
Авторство
О чём код?
// 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.count++ } export const gotEOF = () => { ++_stats.eof }