ProfilingGoalProfiling is a way to provide feedback to the developper about where his program is spending CPU cycles. How it worksProfiling is done on a per thread base. While profiling, a thread is stopped every 1/10 second, and the part of the code it was executing at that time is marked. Setting the recursion parameter to a high value is easier to start with because it will show you top down view of your program. Preparing a program for profilingA module that want to profile some of it's code will include profiler.pli module: module "/pliant/language/debug/profiler.pli" then the code sequence will be: profiler_start The time spent to execute 'do something' is studied through stopping the program every 1/10 second as described in 'How it works' paragram. In order to provide meaningfull information, a thread must run with profiler activated for several seconds, so it is often necessary to repeat program execution: profiler_start A sampleYou can see /pliant/graphic/sample/rip.pli Seeing the resultIn Pliant UI menu, select 'Dashboard' 'Processing' 'Profiler'
|