You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two main ways to add concurrency to the extension:
concurrency at the level of processing metrics pre-request
Details: Output receives batches of metrics that must be iterated over and converted into remote write TimeSeries. This may seems as a natural point to add concurrency like this:
samplesContainers:=o.GetBufferedSamples()
step:=math.Floor(len(samplesContainers) /concurrencyLimit)
fori:=0; i<concurrencyLimit; i++ {
wg.Add(1)
// get chunk of samplesContainers from i * step to (i+1) * stepgofunc(...) {
...gatherpoint[i] =convertToTimeSeries(chunk)
...
}(...)
}
wg.Wait()
fori:=0; i<concurrencyLimit; i++ {
allTS=append(allTS, gatherpoint[i]...)
}
// encode and send remote write request
But this processing must be done within 1 second of flush period. Basic experiments so far showed next to none improvement in trying to spawn goroutines within that time limit. This result will likely be impacted by changes from Metric Refactoring in k6 and might need more investigation.
concurrency at remote write requests
Details: this is blocked by inability to compile TimeSeries (group samples). Attempt to send disjointed samples concurrently would only result in out of order errors.
The text was updated successfully, but these errors were encountered:
As mentioned in description, concurrency experiments don't seem to bring much of an improvement without solving "metrics refactoring" first, which is to be addressed in grafana/xk6-output-prometheus-remote#2.
codebien
transferred this issue from grafana/xk6-output-prometheus-remote
Feb 21, 2025
There are two main ways to add concurrency to the extension:
Details:
Output
receives batches of metrics that must be iterated over and converted into remote writeTimeSeries
. This may seems as a natural point to add concurrency like this:But this processing must be done within 1 second of flush period. Basic experiments so far showed next to none improvement in trying to spawn goroutines within that time limit. This result will likely be impacted by changes from Metric Refactoring in k6 and might need more investigation.
Details: this is blocked by inability to compile
TimeSeries
(group samples). Attempt to send disjointed samples concurrently would only result inout of order
errors.The text was updated successfully, but these errors were encountered: