[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Include milliseconds in test report

From: Branko Cibej <brane_at_xbc.nu>
Date: Tue, 27 Oct 2009 04:37:41 +0100

Bhuvaneswaran A wrote:
> On Mon, 2009-10-26 at 17:16 +0100, Branko Čibej wrote:
>
>> Eh, you have a point. Premature optimization blues. Pity it can't
>> format
>> microseconds directly, though ... but it appears to me that if we use
>> datetime, one can just do:
>>
>> import datetime
>> start_time = datetime.datetime.now()
>> # ...
>> elapsed_time = str(datetime.datetime.now() - start_time)
>>
>> that won't zero-pad the hours, and will print microseconds instead of
>> milliseconds; but surely that shouldn't be a problem as far as parsing
>> the time for JUnit is concerned, yes?
>>
>
> I guess so. We can verify once this change is deployed with
> junit/hudson. Please find attached the revised patch, ditching time
> library, but only using datetime library, similar to above suggestion.
>
> Can you please review the patch?
> [[
> While running the test suite, even the microseconds are accountable.
>
> * build/run_tests.py
> import datetime
> (_run_test): Include microseconds while printing the time taken to
> execute each test. Use datetime library instead of time library.
> ]]
>
> Thanks!
>

The patch is fine, please commit it. I ran the tests on my teensy laptop
(with a RAMdisk) and got:

    real 31m22.361s
    user 21m42.720s
    sys 15m50.920s

Summing up the ELAPSED lines from tests.log yields:

    00:31:21.28

So it would appear that we're calculating test duration correctly. If
the discrepancy between reality and what JUnit reports is bigger htan
this second or so, the problem is clearly in the log file parser, not in
the elapsed time calculation.

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411581
Received on 2009-10-27 04:38:17 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.