cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate Routines entry/exit

Contributor

Duplicate Routines entry/exit

I don't understand.  Why can I not Start profiling when entering a function and Stop profiling when exiting the same function?  I would think that this would be a very common thing to do.  For that matter, why is there a limit of only one anyway?  I can think of other use cases, such as where I'd want to stop and generate a report at the exiting of a function.  What's up with this? Why the limitation?

5 REPLIES 5
Community Hero

Re: Duplicate Routines entry/exit

Hi,

 

I might do not understand your use case / scenario with full details, but aren't Triggers the feature you are looking for (https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/triggers/abo...) ?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Highlighted
Contributor

Re: Duplicate Routines entry/exit

Hi Alex,

Yes, that is what I was attempting to do and I got the error message stating that I have duplicate routines.

I've attached an image of an example.  The function I used is just one that I selected at random.start-stop-example.png

Community Hero

Re: Duplicate Routines entry/exit

Hi,

 

error message stating that I have duplicate routines.

I think this is expected.

According to my understanding of the https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/triggers/abo... help topic (How Triggers Work paragraph):

 

"When an on-trigger routine begins executing, it saves the current profiling status for its thread and enables profiling for that thread. This still applies to everything it calls. When it reaches the end of its execution (after perhaps hundreds of calls, sub-calls and sub-sub-calls), it restores the thread’s profiling status as it found it."

 

So, I think that you should disable all profiling (like it is on the screenshot you've provided), then create the On-trigger and add the target routine to it and start profiling run.

Profiling should start on function enter and stop on exit.

 

Summarizing: Delete Off-trigger and do profiling run. I hope you should get desired result.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: Duplicate Routines entry/exit

Interesting.  So, what would I need to do if I wanted the profiling to occur when entering one function but exiting at some other function?

Community Hero

Re: Duplicate Routines entry/exit

Hi,

 

It might depend on your exact scenario, but I would think about Actions (https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/actions/abou...) - one that enables profiling on enter and another one that disables profiling on exit.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the new Interview