frr icon indicating copy to clipboard operation
frr copied to clipboard

tests: added testcases start and end time

Open y-bharath14 opened this issue 2 years ago • 5 comments

These changes will help us to determine the testsuite execution time

y-bharath14 avatar Apr 26 '24 10:04 y-bharath14

Could you help me understand why we need this for just 3 topotests? Why can't you look at the exec.log first time stamp and last time stamp? Why are they not sufficient? I'm not opposed to having timestamps, but I don't understand the use case here and why these 3 tests matter and why you can't just look at the exec.log start/stop times.

donaldsharp avatar Apr 26 '24 11:04 donaldsharp

Could you help me understand why we need this for just 3 topotests? Why can't you look at the exec.log first time stamp and last time stamp? Why are they not sufficient? I'm not opposed to having timestamps, but I don't understand the use case here and why these 3 tests matter and why you can't just look at the exec.log start/stop times.

Hi DonaldSharp,

Initially, I have picked only few tests for commit. I will be adding testsuite execution time for all the testsuites in coming days.

2024-04-26 13:33:19,340 INFO: topolog: Testsuite start time: Fri Apr 26 13:33:19 2024 2024-04-26 13:33:19,341 INFO: topolog: ========================================

2024-04-26 13:33:57,826 INFO: topolog: Testsuite end time: Fri Apr 26 13:33:57 2024 2024-04-26 13:33:57,827 INFO: topolog: ========================================

Just by adding timestamp, we can see full date format (Day, date, time, year ...).

Thank you.

Regards, Bharath

y-bharath14 avatar Apr 27 '24 15:04 y-bharath14

2024-04-26 13:33:19,340 INFO: topolog: Testsuite start time: Fri Apr 26 13:33:19 2024 2024-04-26 13:33:19,341 INFO: topolog: ========================================

2024-04-26 13:33:57,826 INFO: topolog: Testsuite end time: Fri Apr 26 13:33:57 2024 2024-04-26 13:33:57,827 INFO: topolog: ========================================

So look at the complete left side of the log. Every line already has this. As such all you need to do is look at the first and last lines of the exec.log per test to see test run time. Hence my confusion. What are we gaining again?

donaldsharp avatar Apr 27 '24 16:04 donaldsharp

t are we gaining again?

Hi DonaldSharp,

Yes, you are absolutely right !! Only the one difference I could see here is day & Month in string format( Fri Apr).

Since testsuite execution time is added in couple of ospf-testsuites, I thought of adding the same in all testsuites(Just to maintain the uniformity)

ospf_basic_functionality/test_ospf_nssa.py ospf_basic_functionality/test_ospf_single_area.py ospf_basic_functionality/test_ospf_lan.py:107 ospf_basic_functionality/test_ospf_p2mp.py ospf_basic_functionality/test_ospf_routemaps.py

Thank You

Regards, Bharath

y-bharath14 avatar Apr 29 '24 05:04 y-bharath14

:ci rerun

y-bharath14 avatar May 08 '24 15:05 y-bharath14

IMO this is the wrong approach to the entire problem. If you want start and stop times then it should be done within conftest.py or it's ilk to get it all at once. I do not want an approach that requires special lines to be added to each test script. Do it once and centralize.

donaldsharp avatar May 17 '24 14:05 donaldsharp