[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: Bhuvaneswaran A <bhuvan_at_collab.net>
Date: Mon, 26 Oct 2009 18:20:00 +0530

On Mon, 2009-10-26 at 13:32 +0100, Branko ─îibej wrote:
>
> > AFAIK, srrftime() does not seem to support milliseconds.
>
> [...] Oh duh! Sorry, I mixed up my modules. No, i don't think it makes
> sense to use datetime just for this. I'd do something like the
> following:
>
> elapsed_time = time.strftime('%H:%M:%S.%%03d',
> time.gmtime(test_time)) % \
> math.floor(0.5 + 1000 * math.modf(test_time)[0])
>
> and don't forget to "import math"

Thanks, Branko. Please find attached the revised patch using the methods
in math library.

[[
While running the test suite, even the milliseconds are accountable.

* build/run_tests.py
  import math
  (_run_test): Include milliseconds while printing the time taken to
  execute each test.
]]

-- 
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411372

Received on 2009-10-26 13:50:14 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.