INNER CODE UNIT · TypeScript

devices

gommzystudio/device-activity-tracker · src/signal-tracker.ts:433

        const devices = Array.from(this.deviceMetrics.entries()).map(([id, metrics]) => ({
            jid: id,
            state: metrics.state,
            rtt: metrics.lastRtt,
            avg: metrics.recentRtts.length > 0
                ? metrics.recentRtts.reduce((a, b) => a + b, 0) / metrics.recentRtts.length
                : 0
        }));

        const globalMedian = this.calculateGlobalMedian();
        const globalThreshold = globalMedian * 0.9;

        const data = {
            devices,
            deviceCount: 1,
            presence: null,
            median: globalMedian,
            threshold: globalThreshold

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…