Giter VIP home page Giter VIP logo

Comments (4)

js-dieu avatar js-dieu commented on June 12, 2024 2

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) ?

from pytest-monitor.

s0undt3ch avatar s0undt3ch commented on June 12, 2024

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

from pytest-monitor.

js-dieu avatar js-dieu commented on June 12, 2024

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.

from pytest-monitor.

s0undt3ch avatar s0undt3ch commented on June 12, 2024

from pytest-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.