{"id":13483225,"url":"https://github.com/okdistribute/hyperhealth","last_synced_at":"2025-09-13T16:31:29.654Z","repository":{"id":57270212,"uuid":"77004887","full_name":"okdistribute/hyperhealth","owner":"okdistribute","description":"Monitor the health of a hyperfeed (hypercore or hyperdrive), including peer count and peer mirror percentages.","archived":false,"fork":false,"pushed_at":"2019-06-12T20:23:02.000Z","size":23,"stargazers_count":40,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-24T15:37:02.124Z","etag":null,"topics":["dat","health","hyperdrive","monitoring","network","peer","stats","swarm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okdistribute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-21T01:27:55.000Z","updated_at":"2025-01-25T17:43:57.000Z","dependencies_parsed_at":"2022-08-25T02:20:35.328Z","dependency_job_id":null,"html_url":"https://github.com/okdistribute/hyperhealth","commit_stats":null,"previous_names":["karissa/hyperhealth"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/okdistribute/hyperhealth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhyperhealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhyperhealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhyperhealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhyperhealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okdistribute","download_url":"https://codeload.github.com/okdistribute/hyperhealth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhyperhealth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273468450,"owners_count":25111136,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dat","health","hyperdrive","monitoring","network","peer","stats","swarm"],"created_at":"2024-07-31T17:01:09.229Z","updated_at":"2025-09-13T16:31:29.379Z","avatar_url":"https://github.com/okdistribute.png","language":"JavaScript","funding_links":[],"categories":["Modules"],"sub_categories":[],"readme":"# hyperhealth\n\nMonitor the health of a hyperfeed (hypercore or hyperdrive), including peer count and peer mirror percentages. \n\nDoes not actually download any data content, only downloads some of the metadata and monitors the peer feeds.\n\n```\nnpm install hyperhealth\n```\n\n## Example\n\n```js\nvar Health = require('hyperhealth')\n\nvar health = Health(core)\n\n// Will fire every 1 second\nsetInterval(function () {\n  var data = health.get()\n  console.log(data.peers.length, 'total peers')\n  console.log(data.length, 'total length')\n  console.log(data.byteLength, 'total bytes')\n  console.log('Peer 1 Downloaded ' + (data.peers[0].have / data.peers[0].length) * 100 + '%')\n}, 1000)\n```\n\n## API\n\n### `health = Health(hypercore-or-hyperdrive, [opts])`\n\nTakes a `hyperdrive` or `hypercore` instance. Returns an object `health`.\n\n### `health.get()`\n\nWhen called will return an object representing the health at a particular\nstate.\n\nReturns:\n\n* ```byteLength```: Number of total bytes\n* ```length```: Number of total blocks\n* ```peers```: An array of the peers containing `id`, `length`, and `have`\n\n### Peer object\n\n* `id`: The unique id of the peer, derived from `stream.remoteId`\n* `have`: The number of blocks that have been downloaded by peer\n* `length`: The total number of blocks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokdistribute%2Fhyperhealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokdistribute%2Fhyperhealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokdistribute%2Fhyperhealth/lists"}