Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2010may20 Language: perl Keywords: profile, profiling, optimize, optimizing Q. Where is the time is going in my perl script? A. Here is a bash script that runs a nice profiler: --- Put this in /usr/local/bin/myprof ---#!/bin/sh if [[ -f tmon.out ]]; then rm tmon.out fi perl -d:DProf $* if [[ ! -f tmon.out ]]; then exit fiThen run:myprof myscript.pldprofppThe file tmon.out is created by the first step and used by the second. By default dprofpp only displays the 20 busiest routines. You can show more by doing:dprofpp -O 100
Add a commentSign in to add a comment