{"repo":"Phara0h/nstats","free":true,"listed":false,"github":"https://github.com/Phara0h/nstats","clone":"git clone https://github.com/Phara0h/nstats.git","description":"A fast and compact way to get all your network and process stats for your node application","language":"JavaScript","stars":18,"topics":["stats","compact","process-stats","node","js","node-js","node-module","hacktoberfest","prometheus","grafana"],"license":"MIT","category":"analytics","readme_excerpt":"Nstats A fast and compact way to get all your network and process stats for your node application. Websocket, http/s, express and prometheus compatible! Installation Quick Start (Express) Quick Start (Fastify 4.x.x) Grafana Sample Import the Grafana Dashboard example inside the Grafana folder to view the the stats in a graph like manner. Example Properties stats.data The stats.data object is a JavaScript object containing all the stats. feel free to add your own stats you want to keep track off too! --- stats.interval A time in milliseconds on when the stats will refresh and calculate. Set this to 0 if you do not want it to loop. Methods stats.addWeb(req,res,sTime) A method to add network usage for http requests not done with express or w.s. res is optional if you want stats.data.http data. sTime (The start time of when you received the req BigInt) is optional if you want responseOverhead data. Since its not express or ws, it does not know about it. --- stats.calc() A method to allow you to manually trigger when the stats are computed. optional call back can be passed to let you know its done. ---","default_branch":null,"files":null,"tree":[],"storefront":"/r/Phara0h","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Phara0h/nstats/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}