[Tutor] measuring the start up time of an event-driven program

Stefan Behnel stefan_ml at behnel.de
Tue Jul 24 14:29:00 CEST 2012


Albert-Jan Roskam, 24.07.2012 11:18:
> I would like to test how long it takes for two versions of the same
> program to start up and be ready to receive commands. The program is
> SPSS version-very-old vs. SPSS version-latest.
> 
> Normally I'd just fire the program up in a subprocess and measure the
> time before and after finishing. But this kind of program is never
> finished. It's looping until infinity and waiting for events/commands. I
> tried wrapping it in a "while True" loop, and break out of the loop and
> terminate the program (using ctypes) if the retcode of the process is
> equal to zero. But that doesn't work.

Is it really looping or is it just sitting and waiting for input? You might
be able to provide some input that makes it terminate.

Stefan



More information about the Tutor mailing list