{"id":15836915,"url":"https://github.com/discretetom/tcping","last_synced_at":"2025-10-09T16:19:26.292Z","repository":{"id":65202077,"uuid":"584611951","full_name":"DiscreteTom/tcping","owner":"DiscreteTom","description":"A CLI tool to test TCP socket connection latency using NodeJS.","archived":false,"fork":false,"pushed_at":"2023-01-11T15:39:27.000Z","size":35,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-19T14:00:36.558Z","etag":null,"topics":["cli","latency","latency-test","nodejs","socket","tcp","tcping"],"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/DiscreteTom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-01-03T03:54:52.000Z","updated_at":"2025-01-10T03:17:35.000Z","dependencies_parsed_at":"2023-01-13T15:57:19.625Z","dependency_job_id":null,"html_url":"https://github.com/DiscreteTom/tcping","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DiscreteTom/tcping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Ftcping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Ftcping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Ftcping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Ftcping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiscreteTom","download_url":"https://codeload.github.com/DiscreteTom/tcping/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Ftcping/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001769,"owners_count":26083171,"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-10-09T02:00:07.460Z","response_time":59,"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":["cli","latency","latency-test","nodejs","socket","tcp","tcping"],"created_at":"2024-10-05T15:04:24.254Z","updated_at":"2025-10-09T16:19:26.264Z","avatar_url":"https://github.com/DiscreteTom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tcping\n\n[![npm](https://img.shields.io/npm/v/@discretetom/tcping?color=green\u0026style=flat-square)](https://www.npmjs.com/package/@discretetom/tcping)\n![license](https://img.shields.io/github/license/DiscreteTom/tcping?style=flat-square)\n\nA CLI tool to test how long it takes to establish an TCP connection to a specific address, with percentile support (e.g. p99).\n\n## Installation\n\n```sh\nnpm install -g @discretetom/tcping\n```\n\n## Usage\n\n```\n# tcping --help\nUsage: tcping [options] \u003chost\u003e [port]\nUsage (HTTP mode): tcping -h [options] \u003curl\u003e\n\nOptions:\n      --help        Show help                                          [boolean]\n      --version     Show version number                                [boolean]\n  -i, --interval                                         [number] [default: 500]\n  -t, --timeout                                         [number] [default: 3000]\n  -p, --port        Port number. Not effective in HTTP mode.\n                                                          [number] [default: 80]\n  -c, --count       Number of requests to send. -1 for infinite.\n                                                          [number] [default: -1]\n  -P, --percentile  A list of percentile to display, separated by \",\", e.g.\n                    \"95,99\".                              [string] [default: \"\"]\n  -T, --timestamp   Display timestamp in output.      [boolean] [default: false]\n  -h, --http        Use HTTP mode.                    [boolean] [default: false]\n```\n\n## Examples\n\n### Basics\n\n```\n# tcping baidu.com 443\nhost: baidu.com, port: 443, count: Infinity\nfinish dns lookup, address: 39.156.66.10 family: IPv4\n\nconnected: 52.546ms\nconnected: 54.906ms\nconnected: 50.258ms\nconnected: 50.999ms\nconnected: 56.020ms\nconnected: 54.988ms\nconnected: 344.278ms\nconnected: 46.484ms\n\nstatistics:\nsent: 8, received: 8, success rate: 100%\nmin: 46.484ms, max: 344.278ms, avg: 88.810ms\n```\n\n### Percentile\n\n```\n# tcping baidu.com 80 -P 95\nhost: baidu.com, port: 80, count: Infinity\nfinish dns lookup, address: 39.156.66.10 family: IPv4\n\nconnected: 10.422ms\nconnected: 7.141ms\nconnected: 8.139ms\nconnected: 8.767ms\nconnected: 10.574ms\nconnected: 8.519ms\nconnected: 8.372ms\nconnected: 7.644ms\nconnected: 8.428ms\nconnected: 8.558ms\nconnected: 18.181ms\nconnected: 9.103ms\n\nstatistics:\nsent: 12, received: 12, success rate: 100.00%\nmin: 7.141ms, max: 18.181ms, avg: 9.487ms, p95: 18.181ms\n```\n\n### HTTP Mode\n\n```\n# tcping -h https://baidu.com\nHTTP mode, url: https://baidu.com, count: Infinity\n\nget: 100.288ms, status: 302, length: 161\nget: 25.267ms, status: 302, length: 161\nget: 26.985ms, status: 302, length: 161\nget: 24.540ms, status: 302, length: 161\nget: 24.518ms, status: 302, length: 161\n\nstatistics:\nsent: 5, received: 5, success rate: 100.00%\nmin: 24.518ms, max: 100.288ms, avg: 40.320ms\n```\n\n## [CHANGELOG](https://github.com/DiscreteTom/tcping/blob/main/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscretetom%2Ftcping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscretetom%2Ftcping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscretetom%2Ftcping/lists"}