@@ -4,10 +4,10 @@ DSPC - a dead simple progress counter for concurrent CLI apps in Go.
44
55![ DSPC demo: progress report along with the log output] ( demo.svg )
66
7- Think of it as a set of named atomic counters that is :
7+ Think of it as a set of named atomic counters that are :
88- ** Fast** - lock and allocation free, faster than ` map[string]int ` in both single-threaded and concurrent scenarios
9- - ** Nice to look at** - clean, readable terminal output that updates in place
10- - ** Log-friendly** - won 't interfere with your application's log output
9+ - ** Nice to look at** - clean, readable terminal output that updates in- place
10+ - ** Log-friendly** - don 't interfere with your application's log output
1111- ** Minimalistic** - no dependencies, tiny API
1212
1313
@@ -28,29 +28,31 @@ var progress dspc.Progress
2828defer progress.PrettyPrintEvery (os.Stdout , 1 *time.Second , " Progress:" )()
2929
3030
31- // Then, in worker goroutines increment/decrement/set counters as needed
31+ // Then, in worker goroutines just increment/decrement/set counters as needed
3232progress.Inc (" ok" , 1 )
3333progress.Inc (" errors" , 1 )
3434progress.Inc (" skipped" , 1 )
3535```
3636
37- Check out a complete working [ example ] ( /example/main.go ) .
37+ Check out a complete example [ here ] ( /example/main.go ) .
3838
3939
40- ## Use Cases
41- This library is a good fit for CLI applications that do concurrent work.
42- When running tasks across multiple goroutines, you'll likely want to track their progress -
43- the number of completed tasks, errors, tasks currently in progress. You even may want to track dynamic categories -
40+ ## When to Use
41+ This library is a good fit for CLI applications that do concurrent work.
42+ When running tasks across multiple goroutines, you usually need to track their progress -
43+ the number of completed tasks, errors, tasks currently in progress. You may also want to track dynamic categories -
4444like counting errors by type - "validation_error", "network_error", etc.
4545
46- When running the app in terminal, you'll want to see a clean progress report that updates in real-time,
46+ When running the app in terminal, you want to see a clean progress report that updates in real-time,
4747while keeping your normal application logs readable and separate.
4848
49- Another example could be running such app in Kubernetes. For simple one-off pods, instead of configuring metrics and dashboards, you'll
50- likely want to just watch the logs and progress in real-time with ` kubectl logs -f ` .
49+ Another example is running such apps in Kubernetes. For simple one-off pods, instead of configuring metrics and dashboards, you
50+ may just want to watch the logs and progress reports in real-time with ` kubectl logs -f ` .
5151
52- If this sounds like your use case - tracking concurrent work with simple counters and clean terminal output - then DSPC is likely
53- what you're looking for.
52+ DSPC can also help to debug concurrent applications - just add a few counters to see what's moving and what's stuck,
53+ without setting up complex instrumentation.
54+
55+ If such use cases sound familiar, DSPC is what you need.
5456
5557
5658
@@ -60,7 +62,7 @@ what you're looking for.
6062- Long-running services/daemons
6163- Large number of counters that don't fit on a single screen
6264- Apps with high-frequency logging (e.g., logs every 10ms) - progress updates may get lost in the log stream
63- - Complex metrics - your monitoring needs are not covered by basic counters/gauges
65+ - Complex metrics - your monitoring needs are not covered by simple counters/gauges
6466
6567
6668## Performance
0 commit comments