← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:23 2014

Filename/usr/local/lib/perl/5.14.2/Scalar/Util.pm
StatementsExecuted 13 statements in 327µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
312748262.10ms2.10msScalar::Util::::blessedScalar::Util::blessed (xsub)
13311291.23ms1.23msScalar::Util::::weakenScalar::Util::weaken (xsub)
94465577µs577µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
1531190µs90µsScalar::Util::::isweakScalar::Util::isweak (xsub)
11113µs16µsScalar::Util::::BEGIN@11Scalar::Util::BEGIN@11
12229µs9µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
0000s0sScalar::Util::::export_failScalar::Util::export_fail
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# Scalar::Util.pm
2#
3# Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
4# This program is free software; you can redistribute it and/or
5# modify it under the same terms as Perl itself.
6#
7# Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk>
8
9package Scalar::Util;
10
112215µs219µs
# spent 16µs (13+3) within Scalar::Util::BEGIN@11 which was called: # once (13µs+3µs) by Value::Convertor::BEGIN@53 at line 11
use strict;
# spent 16µs making 1 call to Scalar::Util::BEGIN@11 # spent 3µs making 1 call to strict::import
121500nsrequire Exporter;
13174µsrequire List::Util; # List::Util loads the XS
14
1515µsour @ISA = qw(Exporter);
1612µsour @EXPORT_OK = qw(
17 blessed
18 dualvar
19 isdual
20 isvstring
21 isweak
22 looks_like_number
23 openhandle
24 readonly
25 refaddr
26 reftype
27 set_prototype
28 tainted
29 weaken
30);
311300nsour $VERSION = "1.35";
32122µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
33
341200nsour @EXPORT_FAIL;
35
361500nsunless (defined &weaken) {
37 push @EXPORT_FAIL, qw(weaken);
38}
391200nsunless (defined &isweak) {
40 push @EXPORT_FAIL, qw(isweak isvstring);
41}
421100nsunless (defined &isvstring) {
43 push @EXPORT_FAIL, qw(isvstring);
44}
45
46sub export_fail {
47 if (grep { /^(?:weaken|isweak)$/ } @_ ) {
48 require Carp;
49 Carp::croak("Weak references are not implemented in the version of perl");
50 }
51
52 if (grep { /^isvstring$/ } @_ ) {
53 require Carp;
54 Carp::croak("Vstrings are not implemented in the version of perl");
55 }
56
57 @_;
58}
59
6017µs1;
61
62__END__
 
# spent 2.10ms within Scalar::Util::blessed which was called 3127 times, avg 673ns/call: # 501 times (361µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 62 of Class/MOP/Mixin/HasMethods.pm, avg 720ns/call # 422 times (261µs+0s) by Class::MOP::Mixin::meta or Class::MOP::Object::meta or MongoDB::Collection::meta or MongoDB::Connection::meta or MongoDB::Cursor::meta or MongoDB::Database::meta or MongoDB::MongoClient::meta or MongoDB::OID::meta or Moose::Meta::Role::Application::RoleSummation::meta or Moose::Meta::Role::Application::ToClass::meta or Moose::Meta::Role::Application::ToInstance::meta or Moose::Meta::Role::Application::ToRole::meta or Moose::Meta::Role::Application::meta or Moose::Meta::Role::Composite::meta or Moose::Meta::Role::Method::Required::meta or Moose::Meta::Role::meta or Moose::Meta::TypeCoercion::Union::meta or Moose::Meta::TypeCoercion::meta or Moose::Meta::TypeConstraint::Class::meta or Moose::Meta::TypeConstraint::DuckType::meta or Moose::Meta::TypeConstraint::Enum::meta or Moose::Meta::TypeConstraint::Parameterizable::meta or Moose::Meta::TypeConstraint::Parameterized::meta or Moose::Meta::TypeConstraint::Registry::meta or Moose::Meta::TypeConstraint::Role::meta or Moose::Meta::TypeConstraint::Union::meta or Moose::Meta::TypeConstraint::meta at line 48 of Class/MOP/Method/Meta.pm, avg 619ns/call # 252 times (204µs+0s) by Class::MOP::Method::Accessor::new at line 29 of Class/MOP/Method/Accessor.pm, avg 809ns/call # 222 times (145µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 654ns/call # 217 times (166µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 122 of Class/MOP/Mixin/HasMethods.pm, avg 763ns/call # 186 times (96µs+0s) by Moose::Meta::Attribute::_new or Moose::Meta::Instance::_new or Moose::Meta::Method::_new or Moose::Meta::TypeConstraint::Class::_new or Moose::Meta::TypeConstraint::Parameterizable::_new or Moose::Meta::TypeConstraint::Union::_new or Moose::Meta::TypeConstraint::_new at line 6 of (eval 62)[Eval/Closure.pm:144], avg 519ns/call # 181 times (119µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 20 of Class/MOP/Mixin/HasAttributes.pm, avg 657ns/call # 181 times (95µs+0s) by Class::MOP::Attribute::attach_to_class at line 240 of Class/MOP/Attribute.pm, avg 527ns/call # 124 times (76µs+0s) by Class::MOP::class_of at line 65 of Class/MOP.pm, avg 615ns/call # 118 times (135µs+0s) by Class::MOP::Class::_construct_instance at line 510 of Class/MOP/Class.pm, avg 1µs/call # 105 times (73µs+0s) by Class::MOP::Instance::BUILDARGS at line 23 of Class/MOP/Instance.pm, avg 693ns/call # 105 times (54µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 361 of Moose/Meta/Attribute.pm, avg 514ns/call # 104 times (46µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 312 of Moose/Util/TypeConstraints.pm, avg 444ns/call # 58 times (30µs+0s) by Moose::Meta::Class::add_attribute at line 576 of Moose/Meta/Class.pm, avg 512ns/call # 46 times (26µs+0s) by Class::MOP::Method::Wrapped::wrap at line 76 of Class/MOP/Method/Wrapped.pm, avg 567ns/call # 36 times (26µs+0s) by Moose::Meta::Method::Delegation::new at line 27 of Moose/Meta/Method/Delegation.pm, avg 733ns/call # 36 times (19µs+0s) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 131 of Moose/Meta/Method/Delegation.pm, avg 522ns/call # 35 times (31µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 51 of Moose/Meta/TypeConstraint/Registry.pm, avg 883ns/call # 33 times (20µs+0s) by Class::MOP::Object::meta at line 20 of Class/MOP/Object.pm, avg 603ns/call # 30 times (24µs+0s) by Class::MOP::Method::Constructor::new at line 23 of Class/MOP/Method/Constructor.pm, avg 787ns/call # 28 times (18µs+0s) by Class::MOP::Method::clone at line 135 of Class/MOP/Method.pm, avg 650ns/call # 19 times (13µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 565 of Moose/Util/TypeConstraints.pm, avg 684ns/call # 18 times (10µs+0s) by Class::MOP::Mixin::meta at line 16 of Class/MOP/Mixin.pm, avg 578ns/call # 10 times (9µs+0s) by MongoDB::Collection::DESTROY or MongoDB::Database::DESTROY or MongoDB::OID::DESTROY at line 5 of (eval 62)[Eval/Closure.pm:144], avg 870ns/call # 10 times (5µs+0s) by MongoDB::Collection::new or MongoDB::Cursor::new or MongoDB::Database::new or MongoDB::MongoClient::new at line 11 of (eval 62)[Eval/Closure.pm:144], avg 510ns/call # 9 times (7µs+0s) by MongoDB::Collection::new or MongoDB::Cursor::new or MongoDB::Database::new at line 41 of (eval 62)[Eval/Closure.pm:144], avg 767ns/call # 5 times (3µs+0s) by Mentat::Storage::Mongo::_unbless at line 914 of Mentat/Storage/Mongo.pm, avg 680ns/call # 5 times (3µs+0s) by Log::Core::Essentials::severity_as_str at line 217 of Log/Core/Essentials.pm, avg 520ns/call # 3 times (3µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 61 of Moose/Meta/Method/Destructor.pm, avg 933ns/call # 3 times (2µs+0s) by Moose::Object::new at line 24 of Moose/Object.pm, avg 633ns/call # 3 times (2µs+0s) by Mentat::Storage::Mongo::_unbless at line 904 of Mentat/Storage/Mongo.pm, avg 567ns/call # 3 times (2µs+0s) by Mentat::Storage::Mongo::_encode2json at line 877 of Mentat/Storage/Mongo.pm, avg 533ns/call # 2 times (2µs+0s) by MongoDB::Connection::get_database or MongoDB::Connection::query_timeout at line 94 of Moose/Meta/Method/Delegation.pm, avg 900ns/call # 2 times (2µs+0s) by Moose::Meta::Attribute::_weaken_value at line 817 of Moose/Meta/Attribute.pm, avg 850ns/call # 2 times (2µs+0s) by overload::AddrRef at line 98 of overload.pm, avg 800ns/call # once (5µs+0s) by Mentat::Storage::Mongo::_convertor at line 799 of Mentat/Storage/Mongo.pm # once (3µs+0s) by Mentat::Storage::Mongo::get_last_index at line 627 of Mentat/Storage/Mongo.pm # once (2µs+0s) by Mentat::Storage::Mongo::DESTROY at line 214 of Mentat/Storage/Mongo.pm # once (1µs+0s) by Mentat::Storage::Mongo::_set_last_index at line 826 of Mentat/Storage/Mongo.pm # once (800ns+0s) by Eval::Closure::Sandbox_154::__ANON__[(eval 220)[/usr/local/share/perl/5.14.2/Eval/Closure.pm:144]:3] at line 3 of (eval 62)[Eval/Closure.pm:144] # once (700ns+0s) by Mentat::Storage::Mongo::_init at line 745 of Mentat/Storage/Mongo.pm # once (700ns+0s) by Mentat::Storage::Mongo::find_i at line 383 of Mentat/Storage/Mongo.pm # once (600ns+0s) by Mentat::Storage::new at line 111 of Mentat/Storage.pm # once (600ns+0s) by Mentat::Storage::Mongo::get_last_filter at line 606 of Mentat/Storage/Mongo.pm # once (600ns+0s) by Mentat::Storage::Mongo::reconnect at line 573 of Mentat/Storage/Mongo.pm # once (500ns+0s) by Mentat::Storage::Mongo::disconnect at line 546 of Mentat/Storage/Mongo.pm # once (500ns+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm # once (400ns+0s) by Mentat::Storage::Mongo::_set_last_filter at line 847 of Mentat/Storage/Mongo.pm
sub Scalar::Util::blessed; # xsub
# spent 90µs within Scalar::Util::isweak which was called 153 times, avg 589ns/call: # 153 times (90µs+0s) by Class::MOP::metaclass_is_weak at line 58 of Class/MOP.pm, avg 589ns/call
sub Scalar::Util::isweak; # xsub
# spent 9µs within Scalar::Util::refaddr which was called 12 times, avg 717ns/call: # 10 times (5µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 550ns/call # 2 times (3µs+0s) by overload::AddrRef at line 101 of overload.pm, avg 2µs/call
sub Scalar::Util::refaddr; # xsub
# spent 577µs within Scalar::Util::reftype which was called 944 times, avg 611ns/call: # 241 times (134µs+0s) by Eval::Closure::_validate_env at line 80 of Eval/Closure.pm, avg 554ns/call # 222 times (127µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 574ns/call # 199 times (113µs+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm, avg 567ns/call # 196 times (151µs+0s) by Eval::Closure::_canonicalize_source at line 56 of Eval/Closure.pm, avg 770ns/call # 84 times (51µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 45 of Class/MOP/Mixin/HasMethods.pm, avg 602ns/call # 2 times (2µs+0s) by overload::AddrRef at line 100 of overload.pm, avg 750ns/call
sub Scalar::Util::reftype; # xsub
# spent 1.23ms within Scalar::Util::weaken which was called 1331 times, avg 925ns/call: # 478 times (350µs+0s) by Class::MOP::Method::attach_to_class at line 77 of Class/MOP/Method.pm, avg 733ns/call # 252 times (294µs+0s) by Class::MOP::Method::Accessor::new at line 40 of Class/MOP/Method/Accessor.pm, avg 1µs/call # 181 times (181µs+0s) by Class::MOP::Attribute::attach_to_class at line 242 of Class/MOP/Attribute.pm, avg 1µs/call # 176 times (178µs+0s) by Class::MOP::Method::wrap at line 48 of Class/MOP/Method.pm, avg 1µs/call # 105 times (107µs+0s) by Class::MOP::Instance::new at line 47 of Class/MOP/Instance.pm, avg 1µs/call # 36 times (30µs+0s) by Moose::Meta::Method::Delegation::new at line 50 of Moose/Meta/Method/Delegation.pm, avg 839ns/call # 35 times (27µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 29 of Class/MOP/Method/Meta.pm, avg 777ns/call # 30 times (31µs+0s) by Class::MOP::Method::Constructor::new at line 35 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 28 times (21µs+0s) by Class::MOP::Method::clone at line 136 of Class/MOP/Method.pm, avg 736ns/call # 5 times (6µs+0s) by Moose::Meta::Method::Constructor::new at line 46 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 3 times (4µs+0s) by Moose::Meta::Method::Destructor::new at line 44 of Moose/Meta/Method/Destructor.pm, avg 1µs/call # 2 times (2µs+0s) by Class::MOP::Instance::weaken_slot_value at line 163 of Class/MOP/Instance.pm, avg 1µs/call
sub Scalar::Util::weaken; # xsub