UNPKG

nm-perf-metrics

Version:

šŸ“Š Lightweight React Native module to collect app-level performance metrics in production (Android only).

46 lines (33 loc) • 685 B
# nm-perf-metrics šŸ“Š Lightweight React Native module to collect app-level performance metrics in production (Android only). ## Metrics - āœ… CPU Usage (%) - āœ… Memory Usage (MB and %) - āœ… Slow/Frozen Frames - āœ… FPS ## Installation ```sh npm install nm-perf-metrics cd android && ./gradlew clean && cd .. npx react-native run-android ``` ## Usage ```ts import { getPerfStats } from 'nm-perf-metrics'; const stats = await getPerfStats(); console.log(stats); ``` ## Example Output ```json { "memoryUsedMB": 142.3, "memoryMaxMB": 256, "memoryUsagePercent": 55.6, "cpuUsagePercent": 22.1, "slowFrames": 12, "frozenFrames": 1, "fps": 58 } ``` ## License MIT