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

Collect child processes metrics #1

Open
s0undt3ch opened this issue Mar 7, 2020 · 4 comments
Open

Collect child processes metrics #1

s0undt3ch opened this issue Mar 7, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@s0undt3ch
Copy link

We have a project that starts a few child processes for which we run tests against.

Are there any plans to track child processes statistics?

Describe the solution you'd like
Include child processes stats on metrics.

Describe alternatives you've considered
Hack our own stats/metrics collector.

@flzara flzara added the question Further information is requested label Mar 9, 2020
@js-dieu
Copy link
Collaborator

js-dieu commented Mar 9, 2020

Hello @s0undt3ch

Thanks for your proposal. It might be interesting, but I need a few more insights:

We have a project that starts a few child processes for which we run tests against.

What do you mean precisely? Are each unit tests launching a process? Or is it done by any fixture of yours? Or is it external (global setup done prior to run tests) ?

Are there any plans to track child processes statistics?

From what I've seen, it can be feasible to extend the collects and get an aggregated view for all child processes, but having each child processes metrics is far more complex:

  • the model needs to be reviewed in order to "link" child processes metrics to yours tests (might depend on your setup)
  • collecting such metrics is not free (especially if we need to differentiate child processes): several system calls are involved and might corrupt measures collected for your tests suite. Are you ready to sacrifice the measure correctness in order to extend the collect to child processes ?

Hack our own stats/metrics collector.

I am already working on a centralized API. Maybe we can discuss about it in order to track specific external conditions to your tests (if this is what you are looking for) ?

@s0undt3ch
Copy link
Author

s0undt3ch commented Mar 11, 2020

What do you mean precisely? Are each unit tests launching a process? Or is it done by any fixture of yours? Or is it external (global setup done prior to run tests) ?

These are actually integration tests, and the daemons are started/stopped by a fixture.
The fixture currently has a session scope although we're switching it to a package scope.
To retain, we don't start the daemons on a per-test basis.

From what I've seen, it can be feasible to extend the collects and get an aggregated view for all child processes, but having each child processes metrics is far more complex

What we currently do, which is just log the stats is to report each process cpu/mem stats and a separate state where we calculate that process cpu and memory (including each of its child, aggregated, not differentiated)

collecting such metrics is not free

Yes, we know.

Are you ready to sacrifice the measure correctness in order to extend the collect to child processes ?

We are, although your plugin might not. If implemented, it should be clear on the docs the performance penalty

@js-dieu
Copy link
Collaborator

js-dieu commented Mar 13, 2020

Ok, thanks for the information.

I'll check if I can do something about that and retain such behavior in a purely optional way. However, I am unlikely to code it in the next few days.

@s0undt3ch
Copy link
Author

s0undt3ch commented Mar 13, 2020 via email

@js-dieu js-dieu added enhancement New feature or request and removed question Further information is requested labels Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants