Profiling spawned threads
Some processes spread their workload across multiple threads. If you want to use Guidewire Profiler to profile these threads, use the following pattern:
gw.api.profiler.Profiler.createPotentiallyProfiledRunnable(ProfilerTag entryPointTag,
String entryPointDetail, GWRunnable block)
This code generates a new Runnable object that executes the given block. This Runnable object profiles the block if the calling thread is also being profiled. If this is the case:
- The Profiler associates the stack for that thread with the stack of the calling thread.
- The Profiler persists that thread along with the stack of the calling thread.
See the Javadoc for the Profiler.createPotentiallyProfiledRunnable method for more details.
