@should_profile_cpu
def start_cpu_profiling():
 import yappi
 yappi.start()
 dump_data_every_thread(dump_data, DELAY_MINUTES, SAVE_THREAD_PTR)

@ should_profile_cpu def start_cpu_profiling ( ) : import yappi yappi . start ( ) dump_data_every_thread ( dump_data , DELAY_MINUTES , SAVE_THREAD_PTR )
if the environment variable w3af_profiling is set to 1 .