pmalhaire / xk6-mqtt

k6 mqtt extension
Apache License 2.0
47 stars 37 forks source link

stats package migration #9

Closed codebien closed 2 years ago

codebien commented 2 years ago

k6 v0.38.0 has been released and it contains a breaking change for the stats package. We merged it in the metrics package. The current build of the extension could be affected.

pmalhaire commented 2 years ago

@codebien The migration is in wip in https://github.com/pmalhaire/xk6-mqtt/tree/update/0.38.0

pmalhaire commented 2 years ago

@codebien migration is done, between I am not sure stats are done the right way

    state := m.vu.State()
    msgByteLen := len([]byte(message))
    state.BuiltinMetrics.DataSent.Sink.Add(
        metrics.Sample{Metric: &metrics.Metric{}, Value: float64(msgByteLen), Time: time.Now()},
    )
pmalhaire commented 2 years ago

Update done