Code Monkey home page Code Monkey logo

Comments (5)

soyuka avatar soyuka commented on August 19, 2024

I use it mostly for benchmarks or monitoring.

You could easily keep process usage statistics and then compute to see if you need to scale.

from pidusage.

roccomuso avatar roccomuso commented on August 19, 2024

@soyuka you're right.

I'm trying pidusage under windows. The used memory is around 40MB per process. The cpu_usage always shows me 0. Is it reliable?

from pidusage.

soyuka avatar soyuka commented on August 19, 2024

There has been many discussions around windows, I'm looking for better ways.

For now it spawns wmic (https://github.com/soyuka/pidusage/blob/master/lib/stats.js#L135), and I find it slow and dirty. So, yes according to wmic spec, it should be reliable. If it's efficient, I won't vouch for it on windows.

If you have any idea on how I could improve the windows part please let me know! What's hard is to keep it portable (see #10 #9 #7)

from pidusage.

roccomuso avatar roccomuso commented on August 19, 2024

I see.

Well, at least on my Linux servers there shouldn't be issues. πŸ‘

from pidusage.

soyuka avatar soyuka commented on August 19, 2024

No worries on linux, except if you want to compute child processes ;).

from pidusage.

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.