{"id":18564236,"url":"https://github.com/notashelf/tct","last_synced_at":"2026-01-21T16:37:09.163Z","repository":{"id":244030091,"uuid":"814084864","full_name":"NotAShelf/tct","owner":"NotAShelf","description":"Fast and minimal parallel TCP connection testing utility","archived":false,"fork":false,"pushed_at":"2025-06-18T16:10:49.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-23T05:50:25.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotAShelf.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-12T10:02:25.000Z","updated_at":"2025-06-18T16:10:53.000Z","dependencies_parsed_at":"2024-06-12T15:31:29.936Z","dependency_job_id":"eaac2986-7e6f-43ec-9d83-05677d0adf1c","html_url":"https://github.com/NotAShelf/tct","commit_stats":null,"previous_names":["notashelf/tct"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NotAShelf/tct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Ftct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Ftct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Ftct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Ftct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotAShelf","download_url":"https://codeload.github.com/NotAShelf/tct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Ftct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-06T22:14:39.176Z","updated_at":"2026-01-21T16:37:09.154Z","avatar_url":"https://github.com/NotAShelf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tct\n\n**t**cp **c**onnection **t**imer (tct) is a miniscule utility to help determinee\nthe \"optimal\" number of parallel TCP requests for your network connection, for a\ngiven target.\n\nIt performs a series of tests (following your desired configuration) by\nincrementally increasing the number of parallel requests and measuring the time\ntaken for each test.\n\nThe optimal number is identified as the point where adding more parallel\nrequests does not significantly reduce the overall time taken.\n\n## Usage\n\n```bash\nUsage:\n  tct [flags]\n\nFlags:\n  -d, --delay duration   Delay between requests\n  -h, --help             help for tct\n  -m, --max int          Maximum number of parallel requests (default 100)\n  -u, --url string       URL to fetch (default \"http://example.com\")\n  -v, --version          version for tct\n```\n\nFor example:\n\n```bash\ntct --max 200 --delay 100ms --url \"http://yourtargeturl.com\"\n```\n\nReplace `\"http://yourtargeturl.com\"` with the actual URL you wish to test\nagainst. You can also omit the URL and use an IP address instead. For example,\n`8.8.8.8` for Google or `1.1.1.1` for Cloudflare. You may notice differences\nbetween target URLs as a result of different distances to different hosts, or\ndifferent network setups.\n\nThe `--max` parameter specifies the maximum number of parallel requests to test,\nand `--delay` sets the interval between each request.\n\n\u003e [!TIP]\n\u003e You are strongly advised to use the delay option. I have observed high latency\n\u003e while running with the default 0 second delay, which is likely some form of\n\u003e throttling by the host. If you test against an URL that you _know_ does not\n\u003e throttle connections, then you may consider omitting `-delay`.\n\n### Flags\n\n- `--url`: The URL to fetch.\n- `--max`: Maximum number of parallel requests to test. Default is `100`\n- `--delay`: Delay between requests. Can be specified as a duration (e.g.,\n  `500ms`). Default is `0` (i.e. no delay)\n\n## Motivation\n\nThe [Nix Package Manager](https://github.com/NixOS/nix) has an option called\n`http-connections` that, as per the wiki, sets the _\"maximum number of parallel\nTCP connections used to fetch files from binary caches and by other downloads.\"_\n\nI have found this option a little obscure, however, as the default value (`25`)\nhas no solid motivation behind it. Is it optimal? I don't know. Can it be\noptimized? Probably. tcp has been designed to help you decide a loose range to\nset `http-connections` in.\n\nDo keep in mind that this is not 100% accurate. There are many factors that may\naffect the results of network related tests.\n\n## Notes\n\n- Remember to adjust the `-max` and `-delay` parameters based on your network\n  conditions and the capabilities of the target server. tct tries not to make\n  any assumptions, but the default values will not be suitable for all testing\n  conditions.\n- tct will try to always exit gracefully when you, e.g., kill the program with\n  \u003ckbd\u003eCtrl+C\u003c/kbd\u003e.\n\n## Contributing\n\nContributions are always welcome. If you have any suggestions, create an issue.\nIf you would like to fix my code (can't blame your for it) then create a Pull\nRequest.\n\n## Reference\n\n[Implementing graceful shutdown in go]: https://www.rudderstack.com/blog/implementing-graceful-shutdown-in-go/\n\n- [Implementing graceful shutdown in go]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Ftct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotashelf%2Ftct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Ftct/lists"}