[Libvirt-cim] [PATCH] [TEST] Add timestamps to main.py to calculate run time of tests

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Tue Oct 6 11:38:02 UTC 2009



Kaitlin Rupert wrote:
> Sorry for the slow response on this.
>
>>> +
>>> + testsuite.debug(" Execution time: %sh %smin %ssec %smsec" %
>>> + (h, m, s, msec)) 
>> You can remove the blank space from the above log, so that the 
>> message is aligned with the test case log messages.
>
> Is it alright if I leave it as is? I actually prefer it that way, as I 
> think it makes it easier to read. But if you think it's too busy, I 
> can remove the spaces.
oh! ok no issues.
>
>> You can also include some delimiters between the time values to make 
>> more clear, also we can print the hr , min, sec in H, MIN, SEC would 
>> be good.
>> something like this:
>>
>> testsuite.debug(" ---------------------------")
>
> Oh funny, I also think this makes it more difficult to read.
>
>> testsuite.debug("Execution time: %sh | %smin |%ssec |%smsec|" %
>> (h, m, s, msec))
>
> I really like this though. How about I include this change and once 
> its in stream, we can get feedback about how readable it is. Maybe 
> other people can chime in.
Sure this will be good.
>
>>
>> This will print the information in the following format.
>> Starting test suite: libvirt-cim
>>
>> --------------------------------------------------------------------
>> ComputerSystem - 04_defineStartVS.py: PASS
>> ---------------------------
>> Execution time: 0H | 0MIN |1SEC |638MSEC|
>> --------------------------------------------------------------------
>>
>> Total test execution:
>> ---------------------------
>> Execution time: 0H | 0MIN |1SEC |638MSEC|
>> Testing KVM hypervisor
>> --------------------------------------------------------------------
>> ComputerSystem - 04_defineStartVS.py: PASS
>> ---------------------------
>> Execution time: 0h | 0min |1sec |663msec|
>> --------------------------------------------------------------------
>>
>> Total test execution:
>> ---------------------------
>> Execution time: 0h | 0min |1sec |663msec|
>>
>> Do we require milliseconds information ?
>
> I'd like to keep the milliseconds for now. It's probably not needed, 
> but it can always be removed later on.
>
>> Can we print the total time as part of the Summary information in the 
>> test run report, otherwise we will have to go to the bottom of the 
>> results to know the total time details.
>>
>
> Excellent idea - I will add that as well.
>
>

-- 
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list