szaghi / FITTER

Fortran tIc Toc Timer
15 stars 1 forks source link

"error: cannot start a new snippet tracking before stop the current" #1

Open jacopo-chevallard opened 7 years ago

jacopo-chevallard commented 7 years ago

Very nice and useful module !! :)

It would be great being able to start multiple snippets without having to stop the previous ones, otherwise the usage of the class for code profiling becomes very cumbersome...

Is there any major difficulty in doing that? Or it may be sufficient to have a linked list of snippets (identified by their name), then calling the method %toc(name="snippet_name") to add the time to the right snippet?

szaghi commented 7 years ago

@jacopo-chevallard

Hi Jacopo,

thanks for the kind words.

I have to think about it, nice suggestion. Unfortunately, I cannot do this before 6th July (I have very important work until 5th July). Please be patient!

See you soon.

jacopo-chevallard commented 7 years ago

sure, it is already very useful as it is!

szaghi commented 7 years ago

HI @jacopo-chevallard

I have done both improvements, concurrent snippets tracking and improve output (with auto-sorting based on time consumption).

The API is slightly changed, see the tests. I added a new test for you, this one.

Let me know your feedback.

Thank you again.

Cheers.