For example, it would be great to take any report result from the struct, add it to metrics counter (e.g. Prometheus).
Of course, I can write a CLI wrapper, but it requires too string manipulation and hard to maintain.
Disclaimer
I understand that the report class was initially designed as an implementation detail, and rakyll/hey's responsibility is to simply show simple & nice text-based graph in UTF-8.
However, as rakyll/hey is getting popular, it would be great that this library supports more flexible output for programmers who want to use the power of rakyll/hey much more.
Solution
Here are some suggestions:
Simply make the report struct public (s/report/Report)
Add a new public method and show report-like struct (this can be copy of report struct)
Add a new package to handle output format other than requester package
Background
I am writing a benchmark application server using Go. The app wants to run load testing against both gRPC/HTTP application.
It would be great if report struct becomes public interface so that we can access each data programmatically.
https://github.com/rakyll/hey/blob/22735a3bf7611499f341de944151d22fac68665c/requester/report.go#L33-L64
For example, it would be great to take any report result from the struct, add it to metrics counter (e.g. Prometheus).
Of course, I can write a CLI wrapper, but it requires too string manipulation and hard to maintain.
Disclaimer
I understand that the report class was initially designed as an implementation detail, and rakyll/hey's responsibility is to simply show simple & nice text-based graph in UTF-8.
However, as rakyll/hey is getting popular, it would be great that this library supports more flexible output for programmers who want to use the power of rakyll/hey much more.
Solution
Here are some suggestions:
report
struct)requester
packageExample
gRPC load testing tool, https://github.com/bojand/ghz, support
documentation is here 👉 https://godoc.org/github.com/bojand/ghz
@rakyll what do you think?