Profiler stacks

The purpose of the profiler stack is to store the profiling information for a specific PolicyCenter application thread. The name of the stack itself provides important information:
Profiler type Stack name
Web profiler The stack name lists the beginning and ending screen of each server trip. You can ignore all stacks that include profiler pages.
Entry-point profilers The stack name lists the name of the method, process, or other item that the profiler is tracking.

Each profiler stack implements the standard PUSH and POP functionality of a programming stack. The PUSH and POP operations correspond to the beginning and end, respectively, of a piece of code represented by a profiler tag. Thus, at any time, the current contents of the profiler stack reflect all profiler tags whose code PolicyCenter is currently executing within that particular thread.

Gosu code represents profiler stacks by instances of a gw.api.profiler.ProfilerStack object.

If the current thread initializes the profiler stack, the call to Profiler.push(ProfilerTag.MYTAG) pushes a new frame with tag MYTAG onto that profiler stack. Otherwise, the call has no effect. Similarly, Profiler.pop(frame) is just a pass-through to calling a POP operation on the profiler stack of the current thread. The sequence of PUSH and its the associated POP operation define the boundaries of a single frame.