{"id":23408535,"url":"https://github.com/destel/dspc","last_synced_at":"2025-10-04T15:52:00.991Z","repository":{"id":268960767,"uuid":"905718771","full_name":"destel/dspc","owner":"destel","description":"Show progress of concurrent tasks in your terminal – a minimalistic Go library with a lock-free design","archived":false,"fork":false,"pushed_at":"2024-12-20T10:17:18.000Z","size":35,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T22:42:35.969Z","etag":null,"topics":["concurrency","go","golang","goroutines"],"latest_commit_sha":null,"homepage":"","language":"Go","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/destel.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-12-19T11:41:28.000Z","updated_at":"2025-08-28T09:48:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"66a4c30e-cf13-4182-9a3a-1ec0b32f73af","html_url":"https://github.com/destel/dspc","commit_stats":null,"previous_names":["destel/dspc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/destel/dspc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destel%2Fdspc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destel%2Fdspc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destel%2Fdspc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destel%2Fdspc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/destel","download_url":"https://codeload.github.com/destel/dspc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destel%2Fdspc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278335450,"owners_count":25970129,"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-04T02:00:05.491Z","response_time":63,"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":["concurrency","go","golang","goroutines"],"created_at":"2024-12-22T15:15:27.524Z","updated_at":"2025-10-04T15:52:00.957Z","avatar_url":"https://github.com/destel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dspc [![GoDoc](https://pkg.go.dev/badge/github.com/destel/dspc)](https://pkg.go.dev/github.com/destel/dspc)\n\nShow progress of concurrent tasks in your Go CLI apps.\n\n![dspc demo: progress report along with the log output](demo.svg)\n\nThink of `dspc` as a set of named atomic counters which are:\n- **Fast** - lock and allocation free, faster than `map[string]int` in both single-threaded and concurrent scenarios\n- **Nice to look at** - clean, readable terminal output that updates in-place\n- **Log-friendly** - don't interfere with your application's log output\n- **Minimalistic** - no dependencies, no configuration, tiny API\n\n\n## Installation\n\n```bash\ngo get -u github.com/destel/dspc\n```\n\n\n## Quick Start\n\n```go\n// Create an instance. Zero value is ready to use\nvar progress dspc.Progress\n\n// Start printing progress to stdout every second\ndefer progress.PrettyPrintEvery(os.Stdout, 1*time.Second, \"Progress:\")()\n\n\n// Then, in worker goroutines just increment/decrement/set counters as needed \nprogress.Inc(\"ok\", 1)\nprogress.Inc(\"errors\", 1)\nprogress.Inc(\"skipped\", 1)\n```\n\nCheck out a complete example [here](/example/main.go).\n\n\n## When to Use\nThis library is a good fit for CLI applications that do concurrent work.\nWhen running tasks across multiple goroutines, you usually need to track their progress -\nthe number of tasks that are completed, failed or currently in progress. You may also want to track dynamic categories -\ndifferent kinds of tasks, or types of errors (e.g., \"validation_error\", \"network_error\", etc).\n\nWhen running the app in terminal, you want to see a clean progress report that updates in-place,\nwhile keeping your normal application logs readable and separate.\n\nAnother example is running such apps in Kubernetes. For simple one-off pods, instead of configuring metrics and dashboards, you\nmay just want to watch the logs and progress reports in real-time with `kubectl logs -f`.\n\ndspc can also help to debug concurrent applications. \nAdd a few counters across your goroutines to see which ones are making progress and which ones are stuck.\n\nIf such use cases sound familiar, dspc is what you need.\n\n\n\n\n\n## Not a Good Fit For\n- Long-running services/daemons\n- Large number of counters that don't fit on a single screen\n- Apps with high-frequency logging (e.g., logs every 10ms) - progress updates may get lost in the log stream \n- Complex metrics - your monitoring needs are not covered by simple counters/gauges\n\n\n## Performance\n```\ncpu: Apple M2 Max\nBenchmarkSingleThreaded/Map-12         135504824    8.911 ns/op    0 B/op    0 allocs/op\nBenchmarkSingleThreaded/Progress-12    145009293    8.554 ns/op    0 B/op    0 allocs/op\n\nBenchmarkMultiThreaded/Map-12                           10755136     110.7 ns/op      0 B/op    0 allocs/op\nBenchmarkMultiThreaded/Progress-12                      40967048      47.00 ns/op     0 B/op    0 allocs/op\nBenchmarkMultiThreaded/Progress_w_disjoint_keys-12    1000000000       1.035 ns/op    0 B/op    0 allocs/op\n\nBenchmarkPrinting-12    2464957    467.8 ns/op    0 B/op    0 allocs/op\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestel%2Fdspc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdestel%2Fdspc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestel%2Fdspc/lists"}