On Fri, May 21, 2010 at 10:19:53PM +0100, Nicholas Clark wrote:
> > Log: Run finish_profile() from CHECK, not END when perl is invoked with -c.
> > This allows NYTProf to profile compilation-only checks.
> 
> There are no tests because I have no idea how to test this.
> 
> Specifically, as best I can tell, all the NYTProf tests explicitly start
> profiling at INIT time, to avoid being perturbed by changes in modules loaded,
> such as changes in NYTProf.pm itself.

You can use something like

    run_test_group( {
        extra_options => {
            start => 'begin',
        },
        extra_test_count => ...,
        extra_test_code  => sub {
            my ($profile, $env) = @_;

            $profile = profile_this(
                src_code => ...
                out_file => $env->{file},
                skip_sitecustomize => 1,
            );

            ...

See t/10-run.t

Tim.

-- 
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to