artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.04k stars 511 forks source link

Including CPU & Memory tracking function #1

Closed mijikim closed 9 years ago

mijikim commented 9 years ago

Hi, I think it will be great if minigun run command produces cpu & memory usage report.

I am testing this by incorporating usage module into minigun-core module and supplying pid in the JSON file that 'minigun run' command will read. If pid is not given, run command should work without collecting cpu & memory data. Would appreciate your opinion on this!

hassy commented 9 years ago

Hello @mijikim. Is this for CPU and RAM usage of Minigun itself or of the target? I think that either way, one should be using external tools to monitor the processes, e.g. ps if you're watching Minigun, or collectd or New Relic on your servers. There may be an option to talk to the agent on the host that is running the target process to get the info, but that wouldn't be something I'd prioritise myself right now, although if you wanted to write a plugin for Minigun to do this, I'd be happy to help.

mijikim commented 9 years ago

@hassy This will be for cpu and ram of the target. The use case will be me running a node application on my machine and collecting data of that application by supplying pid. And I am testing usage module to get the data. So instead of embedding this in minigun-core, you suggest a plugin for this feature?

hassy commented 9 years ago

@mijikim I'm guessing you want to correlate the exact point in the load-test with where CPU/RAM usage spikes? Yes, it would be really useful to have this data available in the reports that Minigun generates, but for this feature to be built right into Minigun it would need to:

  1. Be easy to set up (easier than just using another tool like ps or collectd or a New Relic agent etc)
  2. Work with targets that are not on the same machine (because most tests run against targets on remote hosts, not localhost to localhost)
  3. Work with targets written in any language, not just Node (so it cannot rely on the usage module)

But if it were an optional plugin just for testing Node.js apps running locally, then the above doesn't necessarily need to apply.

If you want to give it a go, I'd be happy to help (we'd need to figure out a plugin interface for Minigun).

mijikim commented 9 years ago

@hassy I see your point and agree that this should be a plugin. I am happy to create a plugin for a purpose to record cpu&memory on targets that are on the same machine. I would greatly appreciate your help as this will be my first time contributing to open source project :)

hassy commented 9 years ago

@mijikim I'll need to have a think about a plugin interface for Minigun. Please add suggestions and ideas to: https://github.com/artilleryio/minigun/issues/3 :)