← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 09:58:41 2014
Reported on Tue Jun 24 09:59:15 2014

Filename/usr/local/lib/perl/5.14.2/Scalar/Util.pm
StatementsExecuted 13 statements in 732µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
312849262.11ms2.11msScalar::Util::::blessedScalar::Util::blessed (xsub)
13311291.23ms1.23msScalar::Util::::weakenScalar::Util::weaken (xsub)
94465540µs540µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
1531194µs94µsScalar::Util::::isweakScalar::Util::isweak (xsub)
11127µs34µsScalar::Util::::BEGIN@11Scalar::Util::BEGIN@11
12227µs7µ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
112509µs241µs
# spent 34µs (27+7) within Scalar::Util::BEGIN@11 which was called: # once (27µs+7µs) by Value::Convertor::BEGIN@53 at line 11
use strict;
# spent 34µs making 1 call to Scalar::Util::BEGIN@11 # spent 7µs making 1 call to strict::import
1211µsrequire Exporter;
131140µsrequire List::Util; # List::Util loads the XS
14
15110µsour @ISA = qw(Exporter);
1615µ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);
311600nsour $VERSION = "1.35";
32148µs$VERSION = eval $VERSION;
# spent 4µs executing statements in string eval
33
341500nsour @EXPORT_FAIL;
35
361900nsunless (defined &weaken) {
37 push @EXPORT_FAIL, qw(weaken);
38}
391300nsunless (defined &isweak) {
40 push @EXPORT_FAIL, qw(isweak isvstring);
41}
421300nsunless (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
60116µs1;
61
62__END__
 
# spent 2.11ms within Scalar::Util::blessed which was called 3128 times, avg 673ns/call: # 501 times (358µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 62 of Class/MOP/Mixin/HasMethods.pm, avg 714ns/call # 422 times (260µ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 617ns/call # 252 times (204µs+0s) by Class::MOP::Method::Accessor::new at line 29 of Class/MOP/Method/Accessor.pm, avg 811ns/call # 222 times (148µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 667ns/call # 217 times (178µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 122 of Class/MOP/Mixin/HasMethods.pm, avg 820ns/call # 186 times (95µ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 510ns/call # 181 times (127µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 20 of Class/MOP/Mixin/HasAttributes.pm, avg 702ns/call # 181 times (99µs+0s) by Class::MOP::Attribute::attach_to_class at line 240 of Class/MOP/Attribute.pm, avg 549ns/call # 124 times (74µs+0s) by Class::MOP::class_of at line 65 of Class/MOP.pm, avg 597ns/call # 118 times (132µs+0s) by Class::MOP::Class::_construct_instance at line 510 of Class/MOP/Class.pm, avg 1µs/call # 105 times (68µs+0s) by Class::MOP::Instance::BUILDARGS at line 23 of Class/MOP/Instance.pm, avg 652ns/call # 105 times (48µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 361 of Moose/Meta/Attribute.pm, avg 458ns/call # 104 times (46µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 312 of Moose/Util/TypeConstraints.pm, avg 438ns/call # 58 times (29µs+0s) by Moose::Meta::Class::add_attribute at line 576 of Moose/Meta/Class.pm, avg 503ns/call # 46 times (25µs+0s) by Class::MOP::Method::Wrapped::wrap at line 76 of Class/MOP/Method/Wrapped.pm, avg 548ns/call # 36 times (26µs+0s) by Moose::Meta::Method::Delegation::new at line 27 of Moose/Meta/Method/Delegation.pm, avg 728ns/call # 36 times (17µs+0s) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 131 of Moose/Meta/Method/Delegation.pm, avg 481ns/call # 35 times (32µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 51 of Moose/Meta/TypeConstraint/Registry.pm, avg 917ns/call # 33 times (18µs+0s) by Class::MOP::Object::meta at line 20 of Class/MOP/Object.pm, avg 558ns/call # 30 times (24µs+0s) by Class::MOP::Method::Constructor::new at line 23 of Class/MOP/Method/Constructor.pm, avg 810ns/call # 28 times (18µs+0s) by Class::MOP::Method::clone at line 135 of Class/MOP/Method.pm, avg 650ns/call # 19 times (15µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 565 of Moose/Util/TypeConstraints.pm, avg 768ns/call # 18 times (10µs+0s) by Class::MOP::Mixin::meta at line 16 of Class/MOP/Mixin.pm, avg 572ns/call # 10 times (8µ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 840ns/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 744ns/call # 5 times (3µs+0s) by Mentat::Storage::Mongo::_unbless at line 914 of Mentat/Storage/Mongo.pm, avg 640ns/call # 5 times (3µs+0s) by Log::Core::Essentials::severity_as_str at line 217 of Log/Core/Essentials.pm, avg 540ns/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 Mentat::Storage::Mongo::_unbless at line 904 of Mentat/Storage/Mongo.pm, avg 633ns/call # 3 times (2µs+0s) by Moose::Object::new at line 24 of Moose/Object.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 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 750ns/call # 2 times (1µs+0s) by MongoDB::Connection::get_database or MongoDB::Connection::query_timeout at line 94 of Moose/Meta/Method/Delegation.pm, avg 700ns/call # 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 Sub::Install::_CODELIKE at line 23 of Sub/Install.pm # once (1µs+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 (800ns+0s) by Mentat::Storage::Mongo::_set_last_index at line 826 of Mentat/Storage/Mongo.pm # once (700ns+0s) by Mentat::Storage::Mongo::find at line 446 of Mentat/Storage/Mongo.pm # once (700ns+0s) by Mentat::Storage::Mongo::_init at line 745 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::_set_last_filter at line 847 of Mentat/Storage/Mongo.pm # once (600ns+0s) by Mentat::Storage::Mongo::_convertor at line 799 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 Mentat::Storage::Mongo::get_last_filter at line 606 of Mentat/Storage/Mongo.pm # once (500ns+0s) by Mentat::Storage::Mongo::find_i at line 383 of Mentat/Storage/Mongo.pm
sub Scalar::Util::blessed; # xsub
# spent 94µs within Scalar::Util::isweak which was called 153 times, avg 616ns/call: # 153 times (94µs+0s) by Class::MOP::metaclass_is_weak at line 58 of Class/MOP.pm, avg 616ns/call
sub Scalar::Util::isweak; # xsub
# spent 7µs within Scalar::Util::refaddr which was called 12 times, avg 608ns/call: # 10 times (5µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 490ns/call # 2 times (2µs+0s) by overload::AddrRef at line 101 of overload.pm, avg 1µs/call
sub Scalar::Util::refaddr; # xsub
# spent 540µs within Scalar::Util::reftype which was called 944 times, avg 572ns/call: # 241 times (129µs+0s) by Eval::Closure::_validate_env at line 80 of Eval/Closure.pm, avg 536ns/call # 222 times (100µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 450ns/call # 199 times (116µs+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm, avg 581ns/call # 196 times (146µs+0s) by Eval::Closure::_canonicalize_source at line 56 of Eval/Closure.pm, avg 745ns/call # 84 times (48µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 45 of Class/MOP/Mixin/HasMethods.pm, avg 569ns/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 924ns/call: # 478 times (370µs+0s) by Class::MOP::Method::attach_to_class at line 77 of Class/MOP/Method.pm, avg 774ns/call # 252 times (290µs+0s) by Class::MOP::Method::Accessor::new at line 40 of Class/MOP/Method/Accessor.pm, avg 1µs/call # 181 times (168µs+0s) by Class::MOP::Attribute::attach_to_class at line 242 of Class/MOP/Attribute.pm, avg 927ns/call # 176 times (177µ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 (31µs+0s) by Moose::Meta::Method::Delegation::new at line 50 of Moose/Meta/Method/Delegation.pm, avg 850ns/call # 35 times (27µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 29 of Class/MOP/Method/Meta.pm, avg 774ns/call # 30 times (30µs+0s) by Class::MOP::Method::Constructor::new at line 35 of Class/MOP/Method/Constructor.pm, avg 997ns/call # 28 times (20µs+0s) by Class::MOP::Method::clone at line 136 of Class/MOP/Method.pm, avg 700ns/call # 5 times (5µs+0s) by Moose::Meta::Method::Constructor::new at line 46 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 3 times (3µ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