To selectively profile during only a portion of the code, invoke like this:
$ NYTPROF=start=no perl -d:NYTProf t/load.t -v
t/load.t add the following directives which tell
Devel::NYTProf to start and stop profiling:
DB::enable_profile(); ... ## profile this section DB::finish_profile();
use Devel::NYTProf; in either the test file or in the module.