Refactor the collectors/outputs #1075
Labels
enhancement
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
refactor
Milestone
It's becoming clear that the current
Collector
interface isn't very fit for purpose. It is a poor fit for a lot of the outputs ([1], [2], [3.1], [3.2], [4], [5]), it leads to some code duplication and makes correctly writing new thread-safe outputs relatively difficult, and it also doesn't offer enough functionality for more complicated outputs (#1074). The same thing even has multiple names - what we callCollector
s in the code live in thestats
folder and are presented as "outputs" to users...Additionally, the thresholds and the end-of-test summary are basically somewhat special-purpose outputs... They ingest metrics and do some calculations on them - the summary just spews the aggregated results at the end of the test, while thresholds do some calculations and potentially abort the test execution... They are enabled by default, but can be disabled by users. I'm not sure if it makes sense to refactor them into outputs for just a marginal improvement of code quality, but it should at least be investigated...
I think that when we're investigating the telegraf integration (#1064), we should also investigate their output pipeline architecture. Since their main job is dealing with metrics, there are probably things we can learn from them...
Other somewhat related issues: #917, #570, #587, #1001, #743, #572, #355, #351
The text was updated successfully, but these errors were encountered: