Filename | /usr/local/src/github.com/foswiki/core/lib/Assert.pm |
Statements | Executed 62318 statements in 319ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
61375 | 131 | 36 | 203ms | 203ms | ASSERTS_OFF | Assert::
77 | 77 | 77 | 3.56ms | 3.56ms | import | Assert::
152 | 3 | 3 | 592µs | 592µs | dummyASSERT | Assert::
1 | 1 | 1 | 201µs | 207µs | BEGIN@19 | Assert::
1 | 1 | 1 | 26µs | 101µs | BEGIN@20 | Assert::
1 | 1 | 1 | 22µs | 29µs | BEGIN@17 | Assert::
1 | 1 | 1 | 21µs | 61µs | BEGIN@46 | Assert::
1 | 1 | 1 | 18µs | 51µs | BEGIN@60 | Assert::
1 | 1 | 1 | 17µs | 51µs | BEGIN@47 | Assert::
1 | 1 | 1 | 16µs | 64µs | BEGIN@61 | Assert::
0 | 0 | 0 | 0s | 0s | ASSERT | Assert::
0 | 0 | 0 | 0s | 0s | ASSERTS_ON | Assert::
0 | 0 | 0 | 0s | 0s | TAINT | Assert::
0 | 0 | 0 | 0s | 0s | UNTAINTED | Assert::
0 | 0 | 0 | 0s | 0s | noop | Assert::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Assert; | ||||
3 | |||||
4 | # Derived from Carp::Assert | ||||
5 | # Slightly simplified derived version of Assert | ||||
6 | # Differences are: | ||||
7 | # 1. ASSERT instead of assert | ||||
8 | # 2. has to be _explicitly enabled_ using the $ENV{ASSERT} | ||||
9 | # 3. should and shouldnt have been removed | ||||
10 | # 4. Added UNTAINTED and TAINT | ||||
11 | # | ||||
12 | # Usage is as for Carp::Assert except that you have to explicitly | ||||
13 | # enable asserts using the environment variable ENV{FOSWIKI_ASSERTS} | ||||
14 | # (or ENV{TWIKI_ASSERTS}) | ||||
15 | # add ENV{FOSWIKI_ASSERTS} = 1; to your bin/setlib.cfg or bin/LocalLib.cfg | ||||
16 | |||||
17 | 2 | 45µs | 2 | 36µs | # spent 29µs (22+7) within Assert::BEGIN@17 which was called:
# once (22µs+7µs) by Foswiki::BEGIN@46 at line 17 # spent 29µs making 1 call to Assert::BEGIN@17
# spent 7µs making 1 call to strict::import |
18 | |||||
19 | 2 | 220µs | 2 | 213µs | # spent 207µs (201+6) within Assert::BEGIN@19 which was called:
# once (201µs+6µs) by Foswiki::BEGIN@46 at line 19 # spent 207µs making 1 call to Assert::BEGIN@19
# spent 6µs making 1 call to locale::import |
20 | 2 | 351µs | 2 | 176µs | # spent 101µs (26+75) within Assert::BEGIN@20 which was called:
# once (26µs+75µs) by Foswiki::BEGIN@46 at line 20 # spent 101µs making 1 call to Assert::BEGIN@20
# spent 75µs making 1 call to Exporter::import |
21 | 1 | 14µs | our @ISA = ('Exporter'); | ||
22 | |||||
23 | 1 | 9µs | our %EXPORT_TAGS = ( | ||
24 | NDEBUG => [ 'ASSERT', 'UNTAINTED', 'TAINT', 'DEBUG' ], | ||||
25 | DEBUG => [ 'ASSERT', 'UNTAINTED', 'TAINT', 'DEBUG' ], | ||||
26 | ); | ||||
27 | |||||
28 | 1 | 2µs | our $VERSION = '$Rev$'; | ||
29 | 1 | 5µs | our $DIRTY = lc('x'); # Used in TAINT | ||
30 | |||||
31 | 1 | 7µs | 1 | 2.80ms | Exporter::export_tags(qw(NDEBUG DEBUG)); # spent 2.80ms making 1 call to Exporter::export_tags |
32 | |||||
33 | # constant.pm, alas, adds too much load time (yes, I benchmarked it) | ||||
34 | sub ASSERTS_ON { 1 } # CONSTANT | ||||
35 | 61375 | 313ms | # spent 203ms within Assert::ASSERTS_OFF which was called 61375 times, avg 3µs/call:
# 13575 times (41.9ms+0s) by Foswiki::normalizeWebTopicName at line 1580 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 3µs/call
# 12255 times (42.2ms+0s) by Foswiki::Func::normalizeWebTopicName at line 2772 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 12180 times (40.5ms+0s) by Foswiki::Contrib::MailerContrib::Subscription::new at line 42 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/Subscription.pm, avg 3µs/call
# 12164 times (40.2ms+0s) by Foswiki::Contrib::MailerContrib::WebNotify::subscribe at line 127 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm, avg 3µs/call
# 1188 times (4.15ms+0s) by Foswiki::Func::getContext at line 406 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 1131 times (3.83ms+0s) by Foswiki::Meta::expandMacros at line 3125 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 1099 times (3.39ms+0s) by Foswiki::Func::_checkWTA at line 74 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 1094 times (3.82ms+0s) by Foswiki::Func::expandCommonVariables at line 2467 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 410 times (1.32ms+0s) by Foswiki::Users::mapLogin2cUID at line 385 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm, avg 3µs/call
# 401 times (1.31ms+0s) by Foswiki::Users::TopicUserMapping::_cacheUser at line 1485 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 400 times (1.38ms+0s) by Foswiki::Users::TopicUserMapping::_cacheUser at line 1496 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 347 times (1.20ms+0s) by Foswiki::Store::VC::Handler::new at line 65 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 3µs/call
# 339 times (1.19ms+0s) by Foswiki::Meta::putKeyed at line 1161 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 339 times (1.06ms+0s) by Foswiki::Meta::putKeyed at line 1166 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 339 times (1.05ms+0s) by Foswiki::Meta::putKeyed at line 1163 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 339 times (1.04ms+0s) by Foswiki::Meta::putKeyed at line 1164 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 264 times (980µs+0s) by Foswiki::Meta::get at line 1239 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 189 times (601µs+0s) by Foswiki::MetaCache::current_user at line 283 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 3µs/call
# 159 times (604µs+0s) by Foswiki::Meta::new at line 369 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 159 times (539µs+0s) by Foswiki::Meta::new at line 378 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 155 times (510µs+0s) by Foswiki::topicExists at line 3672 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 3µs/call
# 155 times (481µs+0s) by Foswiki::topicExists at line 3673 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 3µs/call
# 147 times (539µs+0s) by Foswiki::Store::VC::Handler::new at line 92 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 4µs/call
# 147 times (456µs+0s) by Foswiki::Store::VC::Handler::new at line 93 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 3µs/call
# 138 times (521µs+0s) by Foswiki::normalizeWebTopicName at line 1586 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 4µs/call
# 105 times (429µs+0s) by Foswiki::Infix::Parser::__ANON__[/usr/local/src/github.com/foswiki/core/lib/Foswiki/Infix/Parser.pm:299] at line 239 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Infix/Parser.pm, avg 4µs/call
# 91 times (306µs+0s) by Foswiki::Meta::text at line 1083 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (292µs+0s) by Foswiki::Meta::put at line 1116 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 70 times (264µs+0s) by Foswiki::Store::VC::Store::readTopic at line 174 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Store.pm, avg 4µs/call
# 70 times (259µs+0s) by Foswiki::Meta::setEmbeddedStoreForm at line 3519 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 70 times (257µs+0s) by Foswiki::Store::VC::Store::readTopic at line 87 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Store.pm, avg 4µs/call
# 70 times (240µs+0s) by Foswiki::Meta::put at line 1113 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (238µs+0s) by Foswiki::Store::VC::Handler::readFile at line 1005 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 3µs/call
# 70 times (231µs+0s) by Foswiki::Meta::count at line 1401 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (224µs+0s) by Foswiki::Meta::put at line 1115 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (224µs+0s) by Foswiki::Meta::loadVersion at line 1033 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (217µs+0s) by Foswiki::Meta::loadVersion at line 1045 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 70 times (213µs+0s) by Foswiki::Meta::loadVersion at line 1049 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 67 times (226µs+0s) by Foswiki::MetaCache::addMeta at line 144 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 3µs/call
# 67 times (206µs+0s) by Foswiki::MetaCache::addMeta at line 145 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 3µs/call
# 63 times (210µs+0s) by Foswiki::Users::findUserByWikiName at line 510 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm, avg 3µs/call
# 60 times (208µs+0s) by Foswiki::Meta::find at line 1279 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 56 times (211µs+0s) by Foswiki::Meta::load at line 487 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 56 times (205µs+0s) by Foswiki::Meta::load at line 475 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 56 times (192µs+0s) by Foswiki::Access::TopicACLAccess::haveAccess at line 74 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Access/TopicACLAccess.pm, avg 3µs/call
# 56 times (183µs+0s) by Foswiki::Meta::load at line 489 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 45 times (159µs+0s) by Foswiki::MetaCache::get at line 212 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 4µs/call
# 45 times (154µs+0s) by Foswiki::MetaCache::get at line 205 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 3µs/call
# 44 times (141µs+0s) by Foswiki::MetaCache::get at line 192 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm, avg 3µs/call
# 39 times (250µs+0s) by Foswiki::Sandbox::sysCommand at line 486 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Sandbox.pm, avg 6µs/call
# 39 times (131µs+0s) by Foswiki::Users::getCanonicalUserID at line 447 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm, avg 3µs/call
# 34 times (122µs+0s) by Foswiki::Sandbox::untaint at line 128 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Sandbox.pm, avg 4µs/call
# 32 times (139µs+0s) by Foswiki::Render::_handleSquareBracketedLink at line 872 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render.pm, avg 4µs/call
# 29 times (91µs+0s) by Foswiki::Meta::getRevisionInfo at line 1462 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 28 times (109µs+0s) by Foswiki::Form::FieldDefinition::new at line 34 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/FieldDefinition.pm, avg 4µs/call
# 28 times (93µs+0s) by Foswiki::Meta::get at line 1248 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 26 times (97µs+0s) by Foswiki::Func::registerTagHandler at line 536 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 4µs/call
# 25 times (83µs+0s) by Foswiki::Render::_putBackProtected at line 1679 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render.pm, avg 3µs/call
# 23 times (82µs+0s) by Foswiki::Time::formatTime at line 265 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Time.pm, avg 4µs/call
# 22 times (80µs+0s) by Foswiki::Search::formatResults at line 713 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search.pm, avg 4µs/call
# 22 times (78µs+0s) by Foswiki::Search::formatResults at line 744 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search.pm, avg 4µs/call
# 22 times (77µs+0s) by Foswiki::Func::getPreferencesValue at line 717 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 22 times (76µs+0s) by Foswiki::Search::InfoCache::addTopics at line 71 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/InfoCache.pm, avg 3µs/call
# 22 times (68µs+0s) by Foswiki::Search::InfoCache::addTopics at line 73 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/InfoCache.pm, avg 3µs/call
# 21 times (88µs+0s) by Foswiki::Sandbox::_buildCommandLine at line 429 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Sandbox.pm, avg 4µs/call
# 19 times (75µs+0s) by Foswiki::Plugin::new at line 77 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugin.pm, avg 4µs/call
# 19 times (60µs+0s) by Foswiki::Users::TopicUserMapping::getLoginName at line 203 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 16 times (53µs+0s) by Foswiki::Users::TopicUserMapping::getWikiName at line 488 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 16 times (50µs+0s) by Foswiki::Users::TopicUserMapping::getWikiName at line 489 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 14 times (46µs+0s) by Foswiki::Func::addToZone at line 2594 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 13 times (49µs+0s) by Foswiki::ListIterator::new at line 37 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/ListIterator.pm, avg 4µs/call
# 11 times (41µs+0s) by Foswiki::Func::getRequestObject at line 283 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 4µs/call
# 9 times (31µs+0s) by Foswiki::Meta::getLoadedRev at line 2399 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 8 times (88µs+0s) by Foswiki::Store::VC::Handler::getTimestamp at line 1448 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 11µs/call
# 8 times (32µs+0s) by Foswiki::_USERINFO_token at line 120 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/USERINFO.pm, avg 4µs/call
# 8 times (28µs+0s) by Foswiki::_USERINFO_token at line 121 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/USERINFO.pm, avg 3µs/call
# 6 times (26µs+0s) by Foswiki::Render::Anchors::make at line 136 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render/Anchors.pm, avg 4µs/call
# 6 times (21µs+0s) by Foswiki::Func::registerRESTHandler at line 653 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 5 times (21µs+0s) by Foswiki::Meta::renderTML at line 3142 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 5 times (20µs+0s) by Foswiki::Render::getRenderedVersion at line 1091 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render.pm, avg 4µs/call
# 4 times (16µs+0s) by Foswiki::Templates::readTemplate at line 222 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Templates.pm, avg 4µs/call
# 4 times (16µs+0s) by Foswiki::ADDTOZONE at line 41 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/ADDTOZONE.pm, avg 4µs/call
# 4 times (13µs+0s) by Foswiki::Func::getWikiName at line 892 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# 3 times (26µs+0s) by Foswiki::Store::VC::Store::readTopic at line 133 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Store.pm, avg 9µs/call
# 3 times (15µs+0s) by Foswiki::Func::getScriptUrl at line 165 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 5µs/call
# 3 times (11µs+0s) by Foswiki::Func::expandTemplate at line 2440 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 4µs/call
# 3 times (11µs+0s) by Foswiki::Iterator::FilterIterator::new at line 33 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/FilterIterator.pm, avg 4µs/call
# 3 times (10µs+0s) by Foswiki::Users::TopicUserMapping::userExists at line 525 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 3 times (10µs+0s) by Foswiki::Iterator::FilterIterator::new at line 34 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/FilterIterator.pm, avg 3µs/call
# 2 times (8µs+0s) by Foswiki::Meta::getRevisionHistory at line 2329 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 4µs/call
# 2 times (8µs+0s) by Foswiki::Func::readTopic at line 1529 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 4µs/call
# 2 times (8µs+0s) by Foswiki::UserMapping::isInGroup at line 386 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UserMapping.pm, avg 4µs/call
# 2 times (8µs+0s) by Foswiki::Serialise::Embedded::write at line 37 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Serialise/Embedded.pm, avg 4µs/call
# 2 times (8µs+0s) by Foswiki::Response::pushHeader at line 318 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Response.pm, avg 4µs/call
# 2 times (7µs+0s) by Foswiki::Func::readTopicText at line 3442 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 4µs/call
# 2 times (7µs+0s) by Foswiki::Users::TopicUserMapping::_getListOfGroups at line 1519 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm, avg 3µs/call
# 2 times (7µs+0s) by Foswiki::Meta::getEmbeddedStoreForm at line 3498 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 3µs/call
# 2 times (6µs+0s) by Foswiki::Store::VC::Handler::getRevisionHistory at line 421 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm, avg 3µs/call
# 2 times (6µs+0s) by Foswiki::webExists at line 3656 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 3µs/call
# 2 times (6µs+0s) by Foswiki::Serialise::Embedded::getEmbeddedStoreForm at line 73 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Serialise/Embedded.pm, avg 3µs/call
# 2 times (6µs+0s) by Foswiki::Func::topicExists at line 1499 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm, avg 3µs/call
# once (12µs+0s) by Foswiki::UI::View::view at line 121 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UI/View.pm
# once (5µs+0s) by Foswiki::finish at line 2134 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (5µs+0s) by Foswiki::new at line 1696 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (5µs+0s) by Foswiki::Engine::CGI::preparePath at line 138 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Engine/CGI.pm
# once (5µs+0s) by Foswiki::Func::getPluginPreferencesValue at line 750 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm
# once (5µs+0s) by Foswiki::BEGIN@134 at line 137 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (5µs+0s) by Foswiki::Plugins::CommentPlugin::initPlugin at line 38 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/CommentPlugin.pm
# once (4µs+0s) by Foswiki::new at line 1724 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (4µs+0s) by Foswiki::writeCompletePage at line 817 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (4µs+0s) by Foswiki::Search::InfoCache::sortTopics at line 281 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/InfoCache.pm
# once (4µs+0s) by Foswiki::Meta::finish at line 538 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (4µs+0s) by Foswiki::new at line 1634 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (4µs+0s) by Foswiki::Access::TopicACLAccess::new at line 28 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Access/TopicACLAccess.pm
# once (4µs+0s) by Foswiki::Meta::latestIsLoaded at line 2376 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (4µs+0s) by Foswiki::Time::parseTime at line 117 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Time.pm
# once (4µs+0s) by Foswiki::LoginManager::makeLoginManager at line 80 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager.pm
# once (4µs+0s) by Foswiki::Func::checkAccessPermission at line 1353 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm
# once (4µs+0s) by Foswiki::Search::searchWeb at line 248 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search.pm
# once (4µs+0s) by Foswiki::UI::checkWebExists at line 475 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UI.pm
# once (4µs+0s) by Foswiki::Logger::PlainFile::_getLogForLevel at line 232 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Logger/PlainFile.pm
# once (4µs+0s) by Foswiki::Access::new at line 28 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Access.pm
# once (3µs+0s) by Foswiki::Iterator::ProcessIterator::new at line 33 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/ProcessIterator.pm
# once (3µs+0s) by Foswiki::Func::getUrlHost at line 142 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm
# once (3µs+0s) by Foswiki::Iterator::ProcessIterator::new at line 32 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/ProcessIterator.pm
# once (3µs+0s) by Foswiki::Meta::eachTopic at line 942 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (3µs+0s) by Foswiki::Meta::renderFormForDisplay at line 1725 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (3µs+0s) by Foswiki::UI::checkAccess at line 525 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UI.pm
# once (3µs+0s) by Foswiki::Meta::load at line 448 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (3µs+0s) by Foswiki::Func::loadTemplate at line 2402 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm
# once (3µs+0s) by Foswiki::Func::getCanonicalUserID at line 860 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm | ||
36 | |||||
37 | # Provides the same return value and the same context | ||||
38 | # for its parameters as the real TAINT and UNTAINTED | ||||
39 | sub noop($) { return $_[0] } | ||||
40 | |||||
41 | 1 | 2µs | our $soft = 0; | ||
42 | |||||
43 | # Export the proper DEBUG flag if FOSWIKI_ASSERTS is set, | ||||
44 | # otherwise export noop versions of our routines | ||||
45 | # spent 3.56ms within Assert::import which was called 77 times, avg 46µs/call:
# once (96µs+0s) by Foswiki::Serialise::Embedded::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Serialise/Embedded.pm
# once (79µs+0s) by Foswiki::BEGIN@6 at line 6 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/USERINFO.pm
# once (77µs+0s) by Foswiki::Store::Interfaces::QueryAlgorithm::BEGIN@6 at line 6 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/Interfaces/QueryAlgorithm.pm
# once (76µs+0s) by Foswiki::Attrs::BEGIN@51 at line 51 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Attrs.pm
# once (74µs+0s) by Foswiki::Plugins::CommentPlugin::BEGIN@9 at line 9 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/CommentPlugin.pm
# once (72µs+0s) by Foswiki::Plurals::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plurals.pm
# once (71µs+0s) by Foswiki::Logger::PlainFile::BEGIN@7 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Logger/PlainFile.pm
# once (71µs+0s) by Foswiki::Render::BEGIN@14 at line 14 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render.pm
# once (70µs+0s) by Foswiki::Form::Select::BEGIN@9 at line 9 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/Select.pm
# once (69µs+0s) by Foswiki::Contrib::MailerContrib::WebNotify::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm
# once (58µs+0s) by Foswiki::I18N::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/I18N.pm
# once (55µs+0s) by Foswiki::Access::TopicACLAccess::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Access/TopicACLAccess.pm
# once (52µs+0s) by Foswiki::Plugins::CommentPlugin::BEGIN@7.52 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/CommentPlugin/Comment.pm
# once (51µs+0s) by Foswiki::Search::InfoCache::BEGIN@23 at line 23 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/InfoCache.pm
# once (49µs+0s) by Foswiki::Form::BEGIN@38 at line 38 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form.pm
# once (49µs+0s) by Foswiki::LoginManager::TemplateLogin::BEGIN@21 at line 21 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager/TemplateLogin.pm
# once (48µs+0s) by Foswiki::Engine::BEGIN@20 at line 20 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Engine.pm
# once (47µs+0s) by Foswiki::Contrib::MailerContrib::Change::BEGIN@14 at line 14 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/Change.pm
# once (47µs+0s) by Foswiki::Render::Anchors::BEGIN@18 at line 18 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render/Anchors.pm
# once (46µs+0s) by Foswiki::BEGIN@46 at line 46 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm
# once (46µs+0s) by Foswiki::Users::Password::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/Password.pm
# once (46µs+0s) by Foswiki::Attach::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Attach.pm
# once (46µs+0s) by Foswiki::Sandbox::BEGIN@35 at line 35 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Sandbox.pm
# once (45µs+0s) by Foswiki::Plugins::TinyMCEPlugin::BEGIN@8 at line 8 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/TinyMCEPlugin.pm
# once (45µs+0s) by Foswiki::Contrib::MailerContrib::Subscription::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/Subscription.pm
# once (45µs+0s) by Foswiki::If::Parser::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/Parser.pm
# once (45µs+0s) by Foswiki::BEGIN@7 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/ADDTOZONE.pm
# once (45µs+0s) by Foswiki::Prefs::BEGIN@68 at line 68 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm
# once (44µs+0s) by Foswiki::UI::View::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UI/View.pm
# once (44µs+0s) by Foswiki::Plugins::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins.pm
# once (44µs+0s) by Foswiki::Search::ResultSet::BEGIN@24 at line 24 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/ResultSet.pm
# once (44µs+0s) by Foswiki::Search::BEGIN@14 at line 14 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search.pm
# once (44µs+0s) by Foswiki::Logger::BEGIN@7 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Logger.pm
# once (44µs+0s) by Foswiki::Prefs::BaseBackend::BEGIN@16 at line 16 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/BaseBackend.pm
# once (43µs+0s) by Foswiki::Time::BEGIN@38 at line 38 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Time.pm
# once (43µs+0s) by Foswiki::Infix::Node::BEGIN@16 at line 16 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Infix/Node.pm
# once (43µs+0s) by Foswiki::Request::Upload::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Request/Upload.pm
# once (43µs+0s) by Foswiki::Query::OP_ref::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/OP_ref.pm
# once (42µs+0s) by Foswiki::Access::BEGIN@14 at line 14 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Access.pm
# once (42µs+0s) by Foswiki::Plugins::WysiwygPlugin::BEGIN@28 at line 28 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/WysiwygPlugin.pm
# once (42µs+0s) by Foswiki::Templates::BEGIN@35 at line 35 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Templates.pm
# once (41µs+0s) by Foswiki::OopsException::BEGIN@99 at line 99 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/OopsException.pm
# once (41µs+0s) by Foswiki::Func::BEGIN@60 at line 60 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Func.pm
# once (41µs+0s) by Foswiki::UserMapping::BEGIN@37 at line 37 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UserMapping.pm
# once (40µs+0s) by Foswiki::Prefs::Parser::BEGIN@20 at line 20 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm
# once (40µs+0s) by Foswiki::Store::VC::Handler::BEGIN@28 at line 28 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Handler.pm
# once (40µs+0s) by Foswiki::Iterator::NumberRangeIterator::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/NumberRangeIterator.pm
# once (40µs+0s) by Foswiki::Query::Parser::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Parser.pm
# once (40µs+0s) by Foswiki::Users::TopicUserMapping::BEGIN@33 at line 33 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/TopicUserMapping.pm
# once (40µs+0s) by Foswiki::If::OP_allows::BEGIN@18 at line 18 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_allows.pm
# once (40µs+0s) by Foswiki::UI::BEGIN@150 at line 150 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/UI.pm
# once (39µs+0s) by Foswiki::Engine::CGI::BEGIN@21 at line 21 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Engine/CGI.pm
# once (39µs+0s) by Foswiki::Iterator::ProcessIterator::BEGIN@16 at line 16 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/ProcessIterator.pm
# once (38µs+0s) by Foswiki::Infix::Parser::BEGIN@23 at line 23 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Infix/Parser.pm
# once (38µs+0s) by Foswiki::Store::VC::Store::BEGIN@39 at line 39 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/VC/Store.pm
# once (38µs+0s) by Foswiki::Iterator::FilterIterator::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/FilterIterator.pm
# once (38µs+0s) by Foswiki::Contrib::MailerContrib::Subscriber::BEGIN@19 at line 19 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/Subscriber.pm
# once (38µs+0s) by Foswiki::Form::ListFieldDefinition::BEGIN@16 at line 16 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/ListFieldDefinition.pm
# once (38µs+0s) by Foswiki::Store::Interfaces::SearchAlgorithm::BEGIN@6 at line 6 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store/Interfaces/SearchAlgorithm.pm
# once (38µs+0s) by Foswiki::Users::BaseUserMapping::BEGIN@36 at line 36 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/BaseUserMapping.pm
# once (38µs+0s) by Foswiki::Iterator::PagerIterator::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator/PagerIterator.pm
# once (38µs+0s) by Foswiki::Query::Node::BEGIN@34 at line 34 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm
# once (38µs+0s) by Foswiki::Store::BEGIN@56 at line 56 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Store.pm
# once (38µs+0s) by Foswiki::Form::FieldDefinition::BEGIN@20 at line 20 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/FieldDefinition.pm
# once (38µs+0s) by Foswiki::Search::Node::BEGIN@15 at line 15 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/Node.pm
# once (37µs+0s) by Foswiki::MetaCache::BEGIN@20 at line 20 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/MetaCache.pm
# once (37µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@21 at line 21 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users/HtPasswdUser.pm
# once (37µs+0s) by Foswiki::Users::BEGIN@61 at line 61 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm
# once (37µs+0s) by Foswiki::Validation::BEGIN@7 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Validation.pm
# once (37µs+0s) by Foswiki::ListIterator::BEGIN@22 at line 22 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/ListIterator.pm
# once (36µs+0s) by Foswiki::Iterator::BEGIN@23 at line 23 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Iterator.pm
# once (36µs+0s) by Foswiki::LoginManager::BEGIN@53 at line 53 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager.pm
# once (36µs+0s) by Foswiki::Address::BEGIN@66 at line 66 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Address.pm
# once (36µs+0s) by Foswiki::Meta::BEGIN@118 at line 118 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
# once (36µs+0s) by Foswiki::Response::BEGIN@21 at line 21 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Response.pm
# once (36µs+0s) by Foswiki::Request::BEGIN@35 at line 35 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Request.pm
# once (35µs+0s) by Foswiki::Plugin::BEGIN@10 at line 10 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugin.pm | ||||
46 | 2 | 55µs | 2 | 102µs | # spent 61µs (21+41) within Assert::BEGIN@46 which was called:
# once (21µs+41µs) by Foswiki::BEGIN@46 at line 46 # spent 61µs making 1 call to Assert::BEGIN@46
# spent 41µs making 1 call to warnings::unimport |
47 | 2 | 216µs | 2 | 85µs | # spent 51µs (17+34) within Assert::BEGIN@47 which was called:
# once (17µs+34µs) by Foswiki::BEGIN@46 at line 47 # spent 51µs making 1 call to Assert::BEGIN@47
# spent 34µs making 1 call to strict::unimport |
48 | 77 | 996µs | if ( $ENV{FOSWIKI_ASSERTS} || $ENV{TWIKI_ASSERTS} ) { | ||
49 | $soft = 1 if $ENV{FOSWIKI_ASSERTS} and $ENV{FOSWIKI_ASSERTS} eq 'soft'; | ||||
50 | *DEBUG = *ASSERTS_ON; | ||||
51 | Assert->export_to_level( 1, @_ ); | ||||
52 | } | ||||
53 | else { | ||||
54 | 77 | 258µs | my $caller = caller; | ||
55 | 154 | 814µs | *{ $caller . '::ASSERT' } = \&dummyASSERT; | ||
56 | 154 | 630µs | *{ $caller . '::TAINT' } = \&noop; | ||
57 | 154 | 592µs | *{ $caller . '::UNTAINTED' } = \&noop; | ||
58 | 154 | 685µs | *{ $caller . '::DEBUG' } = \&ASSERTS_OFF; | ||
59 | } | ||||
60 | 2 | 52µs | 2 | 84µs | # spent 51µs (18+33) within Assert::BEGIN@60 which was called:
# once (18µs+33µs) by Foswiki::BEGIN@46 at line 60 # spent 51µs making 1 call to Assert::BEGIN@60
# spent 33µs making 1 call to strict::import |
61 | 2 | 375µs | 2 | 113µs | # spent 64µs (16+49) within Assert::BEGIN@61 which was called:
# once (16µs+49µs) by Foswiki::BEGIN@46 at line 61 # spent 64µs making 1 call to Assert::BEGIN@61
# spent 49µs making 1 call to warnings::import |
62 | } | ||||
63 | |||||
64 | # Provides the same return value and the same context | ||||
65 | # for its parameters as the real ASSERT | ||||
66 | # spent 592µs within Assert::dummyASSERT which was called 152 times, avg 4µs/call:
# 150 times (582µs+0s) by Foswiki::Query::Node::evaluate at line 168 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm, avg 4µs/call
# once (5µs+0s) by Foswiki::Search::InfoCache::sortTopics at line 256 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Search/InfoCache.pm
# once (5µs+0s) by Foswiki::Users::getLoginName at line 658 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm | ||||
67 | 152 | 816µs | return; | ||
68 | } | ||||
69 | |||||
70 | sub ASSERT ($;$) { | ||||
71 | unless ( $_[0] ) { | ||||
72 | require Carp; | ||||
73 | my $msg = 'Assertion'; | ||||
74 | $msg .= " ($_[1])" if defined $_[1]; | ||||
75 | $msg .= " failed!\n"; | ||||
76 | if ($soft) { | ||||
77 | Carp::cluck($msg); | ||||
78 | } | ||||
79 | else { | ||||
80 | Carp::confess($msg); | ||||
81 | } | ||||
82 | } | ||||
83 | return; | ||||
84 | } | ||||
85 | |||||
86 | # Test if a value is untainted | ||||
87 | sub UNTAINTED($) { | ||||
88 | local ( @_, $@, $^W ) = @_; | ||||
89 | my $x; | ||||
90 | return eval { $x = $_[0], kill 0; 1 }; | ||||
91 | } | ||||
92 | |||||
93 | # Taint the datum passed and return the tainted value | ||||
94 | sub TAINT($) { | ||||
95 | return substr( $_[0] . $DIRTY, 0, length( $_[0] ) ); | ||||
96 | } | ||||
97 | |||||
98 | 1 | 15µs | 1; | ||
99 | __END__ |