Profile of Sub/Name.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For xt/tapper-mcp-scheduler-with-db-longrun.t
Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:34 2012

Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Sub/Name.pm
Statements | Executed 20 statements in 177µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1462 | 18 | 10 | 4.12ms | 4.12ms | Sub::Name::::subnameSub::Name::subname (xsub)
1 | 1 | 1 | 61µs | 61µs | Sub::Name::::BEGIN@42Sub::Name::BEGIN@42
1 | 1 | 1 | 17µs | 17µs | Sub::Name::::bootstrapSub::Name::bootstrap (xsub)
1 | 1 | 1 | 6µs | 8µs | Sub::Name::::BEGIN@44Sub::Name::BEGIN@44
1 | 1 | 1 | 6µs | 14µs | Sub::Name::::BEGIN@45Sub::Name::BEGIN@45
1 | 1 | 1 | 6µs | 49µs | Sub::Name::::BEGIN@50Sub::Name::BEGIN@50
1 | 1 | 1 | 6µs | 64µs | Sub::Name::::BEGIN@49Sub::Name::BEGIN@49

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Sub::Name;
2 |  |  |  |  |
3 |  |  |  |  | =head1 NAME
4 |  |  |  |  |
5 |  |  |  |  | Sub::Name - (re)name a sub
6 |  |  |  |  |
7 |  |  |  |  | =head1 SYNOPSIS
8 |  |  |  |  |
9 |  |  |  |  | use Sub::Name;
10 |  |  |  |  |
11 |  |  |  |  | subname $name, $subref;
12 |  |  |  |  |
13 |  |  |  |  | $subref = subname foo => sub { ... };
14 |  |  |  |  |
15 |  |  |  |  | =head1 DESCRIPTION
16 |  |  |  |  |
17 |  |  |  |  | This module has only one function, which is also exported by default:
18 |  |  |  |  |
19 |  |  |  |  | =head2 subname NAME, CODEREF
20 |  |  |  |  |
21 |  |  |  |  | Assigns a new name to referenced sub. If package specification is omitted in
22 |  |  |  |  | the name, then the current package is used. The return value is the sub.
23 |  |  |  |  |
24 |  |  |  |  | The name is only used for informative routines (caller, Carp, etc). You won't
25 |  |  |  |  | be able to actually invoke the sub by the given name. To allow that, you need
26 |  |  |  |  | to do glob-assignment yourself.
27 |  |  |  |  |
28 |  |  |  |  | Note that for anonymous closures (subs that reference lexicals declared outside
29 |  |  |  |  | the sub itself) you can name each instance of the closure differently, which
30 |  |  |  |  | can be very useful for debugging.
31 |  |  |  |  |
32 |  |  |  |  | =head1 AUTHOR
33 |  |  |  |  |
34 |  |  |  |  | Matthijs van Duin <xmath@cpan.org>
35 |  |  |  |  |
36 |  |  |  |  | Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved.
37 |  |  |  |  | This program is free software; you can redistribute it and/or modify
38 |  |  |  |  | it under the same terms as Perl itself.
39 |  |  |  |  |
40 |  |  |  |  | =cut
41 |  |  |  |  |
42 | 3 | 70µs | 1 | 61µs | # spent 61µs within Sub::Name::BEGIN@42 which was called: # once (61µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 42 use 5.006; # spent 61µs making 1 call to Sub::Name::BEGIN@42
43 |  |  |  |  |
44 | 3 | 15µs | 2 | 10µs | # spent 8µs (6+2) within Sub::Name::BEGIN@44 which was called: # once (6µs+2µs) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 44 use strict; # spent 8µs making 1 call to Sub::Name::BEGIN@44 # spent 2µs making 1 call to strict::import
45 | 3 | 24µs | 2 | 22µs | # spent 14µs (6+8) within Sub::Name::BEGIN@45 which was called: # once (6µs+8µs) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 45 use warnings; # spent 14µs making 1 call to Sub::Name::BEGIN@45 # spent 8µs making 1 call to warnings::import
46 |  |  |  |  |
47 | 1 | 400ns |  |  | our $VERSION = '0.05';
48 |  |  |  |  |
49 | 3 | 17µs | 2 | 123µs | # spent 64µs (6+59) within Sub::Name::BEGIN@49 which was called: # once (6µs+59µs) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 49 use base 'Exporter'; # spent 64µs making 1 call to Sub::Name::BEGIN@49 # spent 59µs making 1 call to base::import
50 | 3 | 39µs | 2 | 91µs | # spent 49µs (6+43) within Sub::Name::BEGIN@50 which was called: # once (6µs+43µs) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 50 use base 'DynaLoader'; # spent 49µs making 1 call to Sub::Name::BEGIN@50 # spent 43µs making 1 call to base::import
51 |  |  |  |  |
52 | 1 | 800ns |  |  | our @EXPORT = qw(subname);
53 | 1 | 500ns |  |  | our @EXPORT_OK = @EXPORT;
54 |  |  |  |  |
55 | 1 | 5µs | 1 | 247µs | bootstrap Sub::Name $VERSION; # spent 247µs making 1 call to DynaLoader::bootstrap
56 |  |  |  |  |
57 | 1 | 4µs |  |  | 1;
|  |  |  |  | # spent 17µs within Sub::Name::bootstrap which was called: # once (17µs+0s) by DynaLoader::bootstrap at line 223 of DynaLoader.pm sub Sub::Name::bootstrap; # xsub
|  |  |  |  | # spent 4.12ms within Sub::Name::subname which was called 1462 times, avg 3µs/call: # 822 times (2.27ms+0s) by Class::Accessor::Grouped::_mk_group_accessors at line 65 of Class/Accessor/Grouped.pm, avg 3µs/call # 309 times (1.03ms+0s) by Class::MOP::Mixin::HasMethods::add_method at line 83 of Class/MOP/Mixin/HasMethods.pm, avg 3µs/call # 108 times (281µs+0s) by DBIx::Class::Relationship::Accessor::add_relationship_accessor at line 76 of DBIx/Class/Relationship/Accessor.pm, avg 3µs/call # 88 times (216µs+0s) by Moose::Exporter::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Exporter.pm:352] at line 347 of Moose/Exporter.pm, avg 2µs/call # 32 times (113µs+0s) by DBIx::Class::ResultSet::_result_class or DBIx::Class::ResultSet::result_source or DBIx::Class::ResultSource::View::is_virtual or DBIx::Class::ResultSource::View::view_definition or DBIx::Class::ResultSource::_columns or DBIx::Class::ResultSource::_ordered_columns or DBIx::Class::ResultSource::_primaries or DBIx::Class::ResultSource::_relationships or DBIx::Class::ResultSource::_unique_constraints or DBIx::Class::ResultSource::name or DBIx::Class::ResultSource::resultset_attributes or DBIx::Class::ResultSource::source_name or DBIx::Class::SQLMaker::limit_dialect or DBIx::Class::SQLMaker::name_sep or DBIx::Class::Storage::DBI::Cursor::sth or DBIx::Class::Storage::DBI::_conn_pid or DBIx::Class::Storage::DBI::_connect_info or DBIx::Class::Storage::DBI::_dbh or DBIx::Class::Storage::DBI::_dbh_autocommit or DBIx::Class::Storage::DBI::_dbh_details or DBIx::Class::Storage::DBI::_dbi_connect_info or DBIx::Class::Storage::DBI::_dbic_connect_attributes or DBIx::Class::Storage::DBI::_driver_determined or DBIx::Class::Storage::DBI::_sql_maker or DBIx::Class::Storage::DBI::_sql_maker_opts or DBIx::Class::Storage::DBI::disable_sth_caching or DBIx::Class::Storage::DBI::on_connect_call or DBIx::Class::Storage::DBI::on_connect_do or DBIx::Class::Storage::DBI::unsafe or DBIx::Class::Storage::debug or DBIx::Class::Storage::schema or DBIx::Class::Storage::transaction_depth at line 769 of Class/Accessor/Grouped.pm, avg 4µs/call # 23 times (59µs+0s) by Class::MOP::Class::add_around_method_modifier at line 1099 of Class/MOP/Class.pm, avg 3µs/call # 23 times (32µs+0s) by base::import at line 87 of DBIx/Class/ResultSourceProxy.pm, avg 1µs/call # 17 times (24µs+0s) by Class::C3::Componentised::ensure_class_loaded at line 132 of DBIx/Class/Storage/DBI.pm, avg 1µs/call # 14 times (33µs+0s) by Class::Accessor::_mk_accessors at line 82 of Class/Accessor.pm, avg 2µs/call # 4 times (11µs+0s) by DBIx::Class::Relationship::ManyToMany::many_to_many at line 71 of DBIx/Class/Relationship/ManyToMany.pm, avg 3µs/call # 4 times (10µs+0s) by DBIx::Class::Relationship::ManyToMany::many_to_many at line 78 of DBIx/Class/Relationship/ManyToMany.pm, avg 3µs/call # 4 times (10µs+0s) by DBIx::Class::Relationship::ManyToMany::many_to_many at line 109 of DBIx/Class/Relationship/ManyToMany.pm, avg 2µs/call # 4 times (9µs+0s) by DBIx::Class::Relationship::ManyToMany::many_to_many at line 146 of DBIx/Class/Relationship/ManyToMany.pm, avg 2µs/call # 4 times (9µs+0s) by DBIx::Class::Relationship::ManyToMany::many_to_many at line 127 of DBIx/Class/Relationship/ManyToMany.pm, avg 2µs/call # 3 times (5µs+0s) by Class::C3::Componentised::ensure_class_loaded at line 1414 of DBIx/Class/Storage/DBI.pm, avg 2µs/call # once (4µs+0s) by Class::Accessor::_mk_accessors at line 89 of Class/Accessor.pm # once (3µs+0s) by DBIx::Class::SQLMaker::BEGIN@64 at line 72 of DBIx/Class/SQLMaker.pm # once (2µs+0s) by DBIx::Class::SQLMaker::BEGIN@64 at line 77 of DBIx/Class/SQLMaker.pm sub Sub::Name::subname; # xsub