Logic for execution time

I am new to python and I am looking for ‘execution time’ logic that is displayed in the output of ‘evaluate_test_cases(locate_card, tests)’ definition.

Also is it is possible to share the code for ‘evaluate_test_cases’ defination.


I am not quite understanding what you are saying @mohan1504 about the execution time logic. Could you please share a picture?
Also, for your second question, I am not sure, that is up to the Jovian team because they have written that function, and it is their choice if they want to release it.

Thanks :slight_smile:

Hi @mohan1504, Jovian python library is open source. You can find the logic here.

@ hfazal018 here is the screenshot of the execution time

Thank you sidujjain, this link helps me.

So I assume you are asking how they figured out the execution time. Well, they used the dateTime library, or at least that is what I would have used. It has this one feature where you can start a timer, and stop it, and they used that, and they rounded the result to 3 decimal places.

Thank you hfazal018 for the insight

@hfazal018 With reference to the source code of the Jovian Library shared by @sidujjain, They have used a function named default_timer() from the library timeit and not from the dateTime library, The idea is quite the same as said by @hfazal018, Follow the pictures below to understand what the default_timer() function does.