News for hackers. Stuff that matters.

jool

Re:Ponos – A simple yet powerful load generator in Erlang on Tuesday November 18, 2014 @05:34AM (#8623302)
Sure thing. I guess you could even spawn a task that generates new load_generators. In that scenario I guess it could be useful to have the possibility to configure a load generator that terminates after the call_counter reaches a threshold.
Re:Ponos – A simple yet powerful load generator in Erlang on Monday November 17, 2014 @12:56PM (#8619388)
I've put together a really trivial example here (in semi-pseudo code): https://gist.github.com/jool/1e83b22fec9d948194a4.

In the example I've modeled each of your uses as a load generator. So you would have to add one load generator per user. Let me know if you have any questions.

Re:Ponos – A simple yet powerful load generator in Erlang on Monday November 17, 2014 @12:01PM (#8619068)
So. What you could do is implement your own task_runner.

For instance, if you wish to represent each user as a load generator, your task_runner's state could store each load generator's user information in the state indexed by name.

You would then log in the user during the init state.

I'm on the subway but I'll describe it more in detail when I get home.

Re:Ponos – A simple yet powerful load generator in Erlang on Monday November 17, 2014 @11:40AM (#8618950)
For your particular use case though I'd just login and pass the user information as part of the task. The load_generator would then not be concerned about logging in but only issuing commands.
Re:Ponos – A simple yet powerful load generator in Erlang on Monday November 17, 2014 @11:31AM (#8618892)
Where ponos is at currently its main purpose in the world is specialise in generating simple or complex load patterns.

A load_generator in essence is just a process generating triggers at requested frequency. Every trigger happens asynchronously so there is no way to thread state between triggers.

If there is enough interest I'd be happy to extend it to handle synchronous load generators where threading state makes sense. With that use case though, it'd be impossible to guarantee that the actual load matches the load_spec in all circumstances.

If you wish to keep state between triggers you have to implement this outside of ponos at this stage.

Re:Ponos – A simple yet powerful load generator in Erlang on Monday November 17, 2014 @10:47AM (#8618679)
Something the author (me) is aware of. See the Notes section of the README (https://github.com/klarna/ponos#ref1).

The original name is based on the Greek god of hard labor and toil (http://en.wikipedia.org/wiki/Ponos).