Summary | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
use Bio::EnsEMBL::Utils::Eprof( 'eprof_start', 'eprof_end',
'eprof_dump' );
&eprof_start('function-a'); # ... do something &eprof_end('function-a'); &eprof_dump( \*STDERR ); # there is an object based set for above as well, for running # multiple concurrent profilers
_tags | Description | Code |
dump | Description | Code |
end | Description | Code |
eprof_dump | No description | Code |
eprof_end | Description | Code |
eprof_reset | Description | Code |
eprof_start | Description | Code |
new | No description | Code |
start | Description | Code |
_tags | code | next | Top |
Title : _tags |
dump | code | prev | next | Top |
Title : dump |
end | code | prev | next | Top |
Title : end |
eprof_end | code | prev | next | Top |
Title : eprof_end |
eprof_reset | code | prev | next | Top |
Title : eprof_reset |
eprof_start | code | prev | next | Top |
Title : eprof_start |
start | code | prev | next | Top |
Title : start |
_tags | description | prev | next | Top |
my ($obj) = @_; return $obj->{'_tags'}; } 1;}
dump | description | prev | next | Top |
my ( $self, $fh ) = @_; my @tags = sort { $self->_tags()->{$a}->total_time() <=> $self->_tags()->{$b}->total_time() } keys %{ $self->_tags() }; foreach my $tag (@tags) { my $st = $self->_tags->{$tag}; if ( $st->number() == 0 ) { next } my $STD = '---'; if ( $st->number() > 1 ) { my $SS = $st->total_time_time() - $st->total_time()*$st->total_time()/$st->number();}
if ( $SS > 0 ) { $STD = sprintf( "%6f", sqrt( $SS/$st->number()/( $st->number() - 1 ) ) ); } } print( $fh sprintf( "Eprof: %20s %6f %6f %d %s [%6f,%6f]\n", $st->tag(), $st->total_time(), $st->total_time()/$st->number(), $st->number(),
$STD, $st->min_time(),
$st->max_time() ) );
} ## end foreach my $tag (@tags)
} ## end sub dump
end | description | prev | next | Top |
my ( $self, $tag ) = @_; if ( !defined($tag) ) { $self->throw("No tag, can't end."); } if ( !defined( $self->_tags()->{$tag} ) ) { $self->throw( sprintf( "Ending with a nonexistant tag '%s'", $tag ) ); } $self->_tags->{$tag}->pop_stack();}
eprof_dump | description | prev | next | Top |
my ($fh) = @_; if ( !defined($global) ) { return } $global->dump($fh);}
eprof_end | description | prev | next | Top |
my ($tag) = @_; if ( !defined($global) ) { $global = Bio::EnsEMBL::Utils::Eprof->new(); } $global->end($tag);}
eprof_reset | description | prev | next | Top |
undef($global)}
eprof_start | description | prev | next | Top |
my ($tag) = @_; if ( !defined($global) ) { $global = Bio::EnsEMBL::Utils::Eprof->new(); } $global->start($tag);}
new | description | prev | next | Top |
my ($proto) = @_; my $class = ref($proto) || $proto; my $self = bless( { '_tags' => {} }, $class ); return $self;}
start | description | prev | next | Top |
my ( $self, $tag ) = @_; if ( !defined($tag) ) { $self->throw("No tag, can't start."); } if ( !defined( $self->_tags()->{$tag} ) ) { $self->_tags()->{$tag} = Bio::EnsEMBL::Utils::EprofStack->new($tag); } $self->_tags()->{$tag}->push_stack();}
LICENSE | Top |
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACT | Top |
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.