What is a "training segment"?

I’ve noticed that some of my tests get a warning saying that not enough training data is available to run performance analysis.
What is “training segment” and how do I structure my testrun to get automatic performance analysis?

Hey Pawel, sorry for the late reply! You’ve probably already moved on from this question, but just for anyone else that stumbles across this thread, @simme and I answered this live during our k6 Office Hours.

To summarize, a training segment is a minimum amount of test runtime that k6 requires to get enough data to display insights. Our performance insights algorithms work best when your test contains at least 100 complete iterations (runs though your script) before it can find patterns. This error is just a case of not having enough sample data. To fix this, you can increase the duration, number of iterations, or number of virtual users.