{"id":16241381,"url":"https://github.com/bcsabaengine/metrics-1-5-15","last_synced_at":"2025-04-08T09:52:42.760Z","repository":{"id":57295999,"uuid":"468770763","full_name":"BCsabaEngine/metrics-1-5-15","owner":"BCsabaEngine","description":"NodeJS metrics collector like linux 1, 5 and 15 minute metrics","archived":false,"fork":false,"pushed_at":"2022-03-16T22:51:26.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T14:17:21.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BCsabaEngine.png","metadata":{"files":{"readme":"README.hu","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-11T13:56:41.000Z","updated_at":"2022-03-11T14:22:19.000Z","dependencies_parsed_at":"2022-08-30T22:31:01.338Z","dependency_job_id":null,"html_url":"https://github.com/BCsabaEngine/metrics-1-5-15","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fmetrics-1-5-15","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fmetrics-1-5-15/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fmetrics-1-5-15/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCsabaEngine%2Fmetrics-1-5-15/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BCsabaEngine","download_url":"https://codeload.github.com/BCsabaEngine/metrics-1-5-15/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247819946,"owners_count":21001394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:07:25.888Z","updated_at":"2025-04-08T09:52:42.741Z","avatar_url":"https://github.com/BCsabaEngine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS metrics collector like linux 1, 5 and 15 minute metrics\n\nA linux-ban van egy okos kis metrika, amely 1, 5 és 15 percenkénti átlagokat mutat. Általában a CPU terhelését szokták mérni vele, de bármilyen más értékre is jó, például diszk használat vagy hőmérséklet. Az 1 perces érték jól mutatja mennyire terhelt a rendszer éppen most. Az 5 és 15 perces értékek pedig közép- és hosszútávú, átlagos terhelései értékeket mutatnak.\n\nHa szeretnéd NodeJS-ben is használni ezt a hasznos linux képességet, akkor add hozzá a projektedhez a metrics-1-5-15 package-et!\n\nHozzáadás a projekthez:\n```\nnpm i metrics-1-5-15\n```\n\nHasználat számértékek esetén:\n\n```\nimport Metrics from 'metrics-1-5-15';\n\nconst metricCpuLoad = new Metrics();\n\nconst load = Math.round(Math.random() * 4); //Emulate 4 cpu core with random\nmetricCpuLoad.add(load);\n\nmetricCpuLoad.getAvg()     // Display averages\nmetricCpuLoad.getAvg(2)    // Display averages with 2 decimals\nmetricCpuLoad.getAvg(2)[5] // Display 5 minutes average with 2 decimals\n```\n\nÁtlagolás mellett használhatod arra is, hogy megszámolj vele valamit:\n\n```\nimport Metrics from 'metrics-1-5-15';\n\nconst networkBytes = new Metrics();\n\nconst load = Math.round(Math.random() * 2000); //Emulate network load\nnetworkBytes.add(load);\n\nnetworkBytes.getSum()    // Display summary\nnetworkBytes.getSum()[5] // 5 minute summary\n```\n\nTovábbi példákért nézd meg az ```examples``` mappát.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcsabaengine%2Fmetrics-1-5-15","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcsabaengine%2Fmetrics-1-5-15","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcsabaengine%2Fmetrics-1-5-15/lists"}