Implement output template
Closed this issue · 0 comments
GregoryAlbouy commented
Description
With #59, the runner can be integrated in a CI by reading the summary in stdout.
It's an interesting use case, but not ideal for 2 reason:
- some convenience prints add noise to the output
- extracting a specific information form the default summary can be tedious, and it might not even contain the desired information
Here we want to address point 2 by allowing users to shape the CLI output the way they want using a new config option output.template
. It should give access to any value from output.Output
, and the result should override the default summary.
Tasks
- Define new config field
output.template
and update CLI and file parsers accordingly as well as unit tests. Expected value is astring
containing a valid Go'stext/template
syntax. - Optional: perform syntax validation before the run in
config.Global.Validate
- Implement template execution in
output
withoutput.Output
for model. - Optional: leverage access to computed data (
min
,max
,mean
durations, others?) that are not natively accessible viaoutput.Output
Suggestions
Notes
- Blocked by #59