On 05/06/12 21:41, Travis Bear wrote:
Phil,
What do you think of adding the ability for the console to send
arbitrary shell commands to all attached agents? I'd like to be
able to invoke the successor to Grinder Analyzer when a Grinder
run is completed, and do it from within the Grinder
environment. I experimented with putting some shutdown code in
my grinder scripts, but it gets run before crucial information
is written to the grinder logs.
Another serviceable approach would be to allow configuring a
post-run script in grinder.properties, that the agent process
would launch after the worker processes have terminated.
Let me know what you think. I'll enter a feature request for
either of these as needed.
I'd like to figure out how to do this within the worker process, and
without relying on the console, even if we end up with a way for the
console to initiate it.
I know you're after the process statistics, and currently parsing
them from the logs. A Python atexit callback will be called when the
interpreter shuts down, which is still too early for you.
I could add a method to net.grinder.script.Statistics which provides
the script with the accumulated statistics for the process. Then you
wouldn't have to parse the log. There's value in this in general,
please open an ER for it if you agree.
Personally, I think it might be best to write Java code, and
register it using Runtime.atShutdownHook(). This has the advantage
of working for non-Jython script engines too. You would then need to
add a Jar to the classpath and have your script call
"analyzer.registerShutdown()", just once.
- Phil
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use