{"id":23117325,"url":"https://github.com/cablehead/per-sec","last_synced_at":"2026-02-13T15:08:01.871Z","repository":{"id":267983005,"uuid":"902966451","full_name":"cablehead/per-sec","owner":"cablehead","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-13T16:43:05.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T16:52:04.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/cablehead.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,"zenodo":null}},"created_at":"2024-12-13T16:32:19.000Z","updated_at":"2025-01-25T17:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"97030c82-8c54-48fc-b300-affd288cece2","html_url":"https://github.com/cablehead/per-sec","commit_stats":null,"previous_names":["cablehead/per-sec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cablehead/per-sec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fper-sec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fper-sec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fper-sec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fper-sec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cablehead","download_url":"https://codeload.github.com/cablehead/per-sec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fper-sec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29411138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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-12-17T04:20:12.014Z","updated_at":"2026-02-13T15:08:01.838Z","avatar_url":"https://github.com/cablehead.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# per-sec\n\nA Unix-style tool that buffers stdin and executes a command with the buffered input every second, following the philosophy of djb's tool chain design.\n\n## Installation\n\n```bash\n# Clone and install from GitHub\ngit clone https://github.com/cablehead/per-sec.git\ncd per-sec\ncargo install --path .\n```\n\n## Usage\n\n```\nper-sec \u003ccommand\u003e [args...]\n```\n\nThe program reads from stdin continuously, buffers the input, and every second:\n1. Spawns the specified command with any provided arguments\n2. Writes the buffered input to the command's stdin\n3. Clears the buffer for the next second\n\nIf no input is received during a one-second window, the command is still executed with an empty stdin.\n\n## Examples\n\nCount Bluesky firehose events per second:\n```bash\nwebsocat \"wss://jetstream1.us-east.bsky.network/subscribe\" | per-sec wc -l\n```\n\nProcess batches of data every second:\n```bash\ncat stream.jsonl | per-sec jq -c 'group_by(.type)'\n```\n\nMonitor HTTP requests per second:\n```bash\ntail -f access.log | per-sec grep 'GET' | per-sec wc -l\n```\n\n## Dependencies\n\n- Built with Rust\n- Uses [timeout-readwrite](https://github.com/jcreekmore/timeout-readwrite-rs) for IO timeouts without an async runtime\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fper-sec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcablehead%2Fper-sec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fper-sec/lists"}