Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit the end-of-iteration metrics outside of the networking and JS code #1250

Open
na-- opened this issue Nov 19, 2019 · 4 comments
Open

Emit the end-of-iteration metrics outside of the networking and JS code #1250

na-- opened this issue Nov 19, 2019 · 4 comments
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 executors maintenance refactor

Comments

@na--
Copy link
Member

na-- commented Nov 19, 2019

After #1203, the iterations metric is emitted as a part of the netext.NetTrail struct, together with the iteration_duration, data_received, and data_sent metrics. This somewhat makes sense, however it doesn't make sense to call that metric sample container netext.NetTrail (since only 50% of its metrics are network-related). It also doesn't make sense to emit these metrics from the JS code - since they relate to iterations, they should be emitted by the thing that controls iterations...

So, after #1007 is merged, we should refactor the code, probably like this:

  • call the SampleContainer something else, IterationMetrics or something like that
  • the netext.Dialer would still be needed, but it will only be concerned with the data_sent and data_received metrics, which would then be re-packaged in that new struct
  • that struct should be assembled and emitted somewhere outside of the JS code, probably here (that would also allow us to have more accurate non-JS unit tests, for example this one)
@na-- na-- added this to the v1.0.0 milestone Nov 19, 2019
@na-- na-- added the executors label May 21, 2020
@na-- na-- modified the milestones: v1.0.0, v0.28.0 May 21, 2020
@na-- na-- modified the milestones: v0.28.0, v0.29.0 Sep 9, 2020
@na-- na-- modified the milestones: v0.29.0, v0.30.0 Nov 4, 2020
@na-- na-- modified the milestones: v0.30.0, v0.31.0 Jan 13, 2021
@na-- na-- modified the milestones: v0.31.0, v0.32.0 Feb 24, 2021
@na-- na-- modified the milestones: v0.32.0, v0.33.0 Apr 14, 2021
@na-- na-- modified the milestones: v0.33.0, v0.34.0 Jun 16, 2021
@mstoykov mstoykov modified the milestones: v0.34.0, v0.35.0 Sep 1, 2021
@Shehab7osny
Copy link

Hi, I would like to work on this issue.
May you please assign it to me?
Thanks!

@na--
Copy link
Member Author

na-- commented Oct 11, 2021

@Shehab7osny, I've assigned you, let us know if you have any questions or problems with this.

@Shehab7osny
Copy link

@na-- Thanks, I will start working on this issue.
May I use slack for any clarification or questions?

@na--
Copy link
Member Author

na-- commented Oct 12, 2021

Sure, though you can also just ask any questions here as well 🤷‍♂️

@na-- na-- removed this from the v0.35.0 milestone Nov 2, 2021
@na-- na-- added evaluation needed proposal needs to be validated or tested before fully implementing it in k6 and removed hacktoberfest labels Nov 3, 2021
mstoykov added a commit that referenced this issue Aug 22, 2024
This is an artifact of both data sent/received and iterations being in
the same SampleContainer. So where one was emitted we needed to emit the
other.

That hasn't been a requirement for a while as evident by the dropping of
NetTrail with no breaking in outputs.

This also stops emitting `iteration_duration` in not default functions
(teardown, setup) as it already does for `iterations`.

Closes #1605
Part of #1250
mstoykov added a commit that referenced this issue Aug 22, 2024
…3908)

This is an artifact of both data sent/received and iterations being in
the same SampleContainer. So where one was emitted we needed to emit the
other.

That hasn't been a requirement for a while as evident by the dropping of
NetTrail with no breaking in outputs.

This also stops emitting `iteration_duration` in not default functions
(teardown, setup) as it already does for `iterations`.

Closes #1605
Part of #1250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 executors maintenance refactor
Projects
None yet
Development

No branches or pull requests

3 participants