mcdave has asked for the wisdom of the Perl Monks concerning the following question:
I have a test plan that does a sequence of steps, building on each other. I call the file with Test::Harness. I wrap each step in an "ok" statement, and I can get a nice statement at the end about the total time used in the process. That's very nice. I don't see a way to get it to tell me how many milliseconds each individual test took, though.
Technically, I don't really care about the absolute numbers. I actually want to know whether speeding up step N in various ways will slow down step N+1. I'm sure other clever things would come to mind if I could get it working, but I had in mind something that would process the output from my Test::Harness run and come up with some sort of statement about where my bottlenecks are, etc. So I'd like the output to be something like
and I'd look at that and do something with it.ok 1 - 100 ms - the first test ok 2 - 85 ms - test #2 ok 3 - 25 ms - done now 1..3 ok 210 ms Result: PASS
As it stands now, I get most of this information but can't get the intermediate "ok" statements to tell me their timing. I wonder if there's a different tool I should look at or if I can just teach Test::Harness to do its output differently. I understand it would work fine if I used separate test files for each little piece, but then I don't see how to pass the results from one to the next.
Thanks for your help,
dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting timing details from a test
by moritz (Cardinal) on Jan 07, 2011 at 21:52 UTC | |
by mcdave (Beadle) on May 29, 2012 at 16:49 UTC | |
|
Re: Getting timing details from a test
by kennethk (Abbot) on Jan 07, 2011 at 20:42 UTC | |
by mcdave (Beadle) on Jan 13, 2011 at 18:11 UTC |