Filename | /var/www/foswiki11/lib/Assert.pm |
Statements | Executed 486134 statements in 1.60s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
459125 | 121 | 30 | 361ms | 361ms | ASSERTS_OFF | Assert::
26595 | 5 | 4 | 23.9ms | 23.9ms | dummyASSERT | Assert::
65 | 65 | 65 | 1.14ms | 1.14ms | import | Assert::
1 | 1 | 1 | 414µs | 422µs | BEGIN@19 | Assert::
1 | 1 | 1 | 20µs | 42µs | BEGIN@17 | Assert::
1 | 1 | 1 | 19µs | 40µs | BEGIN@20 | Assert::
1 | 1 | 1 | 16µs | 34µs | BEGIN@45 | Assert::
1 | 1 | 1 | 14µs | 32µs | BEGIN@59 | Assert::
1 | 1 | 1 | 13µs | 31µs | BEGIN@46 | Assert::
1 | 1 | 1 | 12µs | 36µs | BEGIN@60 | Assert::
4 | 1 | 1 | 8µs | 8µs | noop | 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::
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 | 53µs | 2 | 64µs | # spent 42µs (20+22) within Assert::BEGIN@17 which was called:
# once (20µs+22µs) by Foswiki::BEGIN@46 at line 17 # spent 42µs making 1 call to Assert::BEGIN@17
# spent 22µs making 1 call to strict::import |
18 | |||||
19 | 2 | 496µs | 2 | 429µs | # spent 422µs (414+7) within Assert::BEGIN@19 which was called:
# once (414µs+7µs) by Foswiki::BEGIN@46 at line 19 # spent 422µs making 1 call to Assert::BEGIN@19
# spent 7µs making 1 call to locale::import |
20 | 2 | 218µs | 2 | 61µs | # spent 40µs (19+21) within Assert::BEGIN@20 which was called:
# once (19µs+21µs) by Foswiki::BEGIN@46 at line 20 # spent 40µs making 1 call to Assert::BEGIN@20
# spent 21µs making 1 call to Exporter::import |
21 | 1 | 11µs | our @ISA = ('Exporter'); | ||
22 | |||||
23 | 1 | 7µs | our %EXPORT_TAGS = ( | ||
24 | NDEBUG => [ 'ASSERT', 'UNTAINTED', 'TAINT', 'DEBUG' ], | ||||
25 | DEBUG => [ 'ASSERT', 'UNTAINTED', 'TAINT', 'DEBUG' ], | ||||
26 | ); | ||||
27 | |||||
28 | 1 | 3µs | our $DIRTY = lc('x'); # Used in TAINT | ||
29 | |||||
30 | 1 | 4µs | 1 | 2.49ms | Exporter::export_tags(qw(NDEBUG DEBUG)); # spent 2.49ms making 1 call to Exporter::export_tags |
31 | |||||
32 | # constant.pm, alas, adds too much load time (yes, I benchmarked it) | ||||
33 | sub ASSERTS_ON { 1 } # CONSTANT | ||||
34 | 459125 | 1.52s | # spent 361ms within Assert::ASSERTS_OFF which was called 459125 times, avg 786ns/call:
# 81918 times (54.6ms+0s) by Foswiki::normalizeWebTopicName at line 1604 of /var/www/foswiki11/lib/Foswiki.pm, avg 667ns/call
# 81336 times (72.2ms+0s) by Foswiki::Func::normalizeWebTopicName at line 2833 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 888ns/call
# 47352 times (35.9ms+0s) by Foswiki::Store::VC::Handler::new at line 65 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 758ns/call
# 46261 times (40.5ms+0s) by Foswiki::topicExists at line 3766 of /var/www/foswiki11/lib/Foswiki.pm, avg 876ns/call
# 46261 times (35.3ms+0s) by Foswiki::topicExists at line 3767 of /var/www/foswiki11/lib/Foswiki.pm, avg 762ns/call
# 26366 times (20.8ms+0s) by Foswiki::MetaCache::get at line 210 of /var/www/foswiki11/lib/Foswiki/MetaCache.pm, avg 791ns/call
# 19042 times (19.3ms+0s) by Foswiki::Meta::get at line 1143 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 17725 times (14.1ms+0s) by Foswiki::normalizeWebTopicName at line 1610 of /var/www/foswiki11/lib/Foswiki.pm, avg 794ns/call
# 9189 times (5.27ms+0s) by Foswiki::Meta::text at line 991 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 573ns/call
# 8845 times (7.46ms+0s) by Foswiki::Search::formatResults at line 758 of /var/www/foswiki11/lib/Foswiki/Search.pm, avg 843ns/call
# 8761 times (6.24ms+0s) by Foswiki::Meta::latestIsLoaded at line 2376 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 713ns/call
# 8760 times (7.56ms+0s) by Foswiki::MetaCache::get at line 140 of /var/www/foswiki11/lib/Foswiki/MetaCache.pm, avg 863ns/call
# 8760 times (7.02ms+0s) by Foswiki::Search::InfoCache::addTopic at line 89 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm, avg 802ns/call
# 7788 times (5.51ms+0s) by Foswiki::Meta::putKeyed at line 1067 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 707ns/call
# 7788 times (4.68ms+0s) by Foswiki::Meta::putKeyed at line 1068 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 601ns/call
# 7788 times (4.54ms+0s) by Foswiki::Meta::putKeyed at line 1071 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 583ns/call
# 7788 times (4.25ms+0s) by Foswiki::Meta::putKeyed at line 1069 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 546ns/call
# 1380 times (1.40ms+0s) by Foswiki::Store::VC::Handler::new at line 92 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 1µs/call
# 1380 times (1.04ms+0s) by Foswiki::Store::VC::Handler::new at line 93 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 753ns/call
# 1104 times (1.31ms+0s) by Foswiki::Meta::new at line 348 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 1104 times (859µs+0s) by Foswiki::Meta::new at line 357 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 778ns/call
# 1069 times (697µs+0s) by Foswiki::Users::TopicUserMapping::_cacheUser at line 1589 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm, avg 652ns/call
# 1067 times (635µs+0s) by Foswiki::Users::mapLogin2cUID at line 403 of /var/www/foswiki11/lib/Foswiki/Users.pm, avg 595ns/call
# 1064 times (735µs+0s) by Foswiki::Users::TopicUserMapping::_cacheUser at line 1600 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm, avg 691ns/call
# 824 times (744µs+0s) by Foswiki::Meta::put at line 1020 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 903ns/call
# 824 times (629µs+0s) by Foswiki::Meta::put at line 1021 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 764ns/call
# 824 times (544µs+0s) by Foswiki::Meta::put at line 1022 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 660ns/call
# 555 times (436µs+0s) by Foswiki::Meta::find at line 1178 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 785ns/call
# 533 times (394µs+0s) by Foswiki::Users::findUserByWikiName at line 528 of /var/www/foswiki11/lib/Foswiki/Users.pm, avg 740ns/call
# 426 times (485µs+0s) by Foswiki::Meta::setEmbeddedStoreForm at line 3581 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 426 times (395µs+0s) by Foswiki::Store::VC::Handler::readFile at line 1006 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 927ns/call
# 426 times (345µs+0s) by Foswiki::Meta::count at line 1294 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 809ns/call
# 426 times (322µs+0s) by Foswiki::Meta::loadVersion at line 955 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 756ns/call
# 426 times (296µs+0s) by Foswiki::Meta::loadVersion at line 966 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 696ns/call
# 426 times (292µs+0s) by Foswiki::Store::VC::Store::readTopic at line 75 of /var/www/foswiki11/lib/Foswiki/Store/VC/Store.pm, avg 685ns/call
# 381 times (422µs+0s) by Foswiki::Users::getCanonicalUserID at line 465 of /var/www/foswiki11/lib/Foswiki/Users.pm, avg 1µs/call
# 308 times (210µs+0s) by Foswiki::Meta::getRevisionInfo at line 1352 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 683ns/call
# 238 times (286µs+0s) by Foswiki::Plugins::dispatch at line 337 of /var/www/foswiki11/lib/Foswiki/Plugins.pm, avg 1µs/call
# 235 times (568µs+0s) by Foswiki::ListIterator::new at line 39 of /var/www/foswiki11/lib/Foswiki/ListIterator.pm, avg 2µs/call
# 185 times (185µs+0s) by Foswiki::Sandbox::untaint at line 126 of /var/www/foswiki11/lib/Foswiki/Sandbox.pm, avg 998ns/call
# 177 times (185µs+0s) by Foswiki::webExists at line 3750 of /var/www/foswiki11/lib/Foswiki.pm, avg 1µs/call
# 164 times (322µs+0s) by Foswiki::Sandbox::sysCommand at line 484 of /var/www/foswiki11/lib/Foswiki/Sandbox.pm, avg 2µs/call
# 125 times (140µs+0s) by Foswiki::Search::InfoCache::addTopics at line 71 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm, avg 1µs/call
# 125 times (109µs+0s) by Foswiki::Search::InfoCache::addTopics at line 73 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm, avg 872ns/call
# 106 times (120µs+0s) by Foswiki::Infix::Parser::__ANON__[/var/www/foswiki11/lib/Foswiki/Infix/Parser.pm:277] at line 226 of /var/www/foswiki11/lib/Foswiki/Infix/Parser.pm, avg 1µs/call
# 81 times (232µs+0s) by Foswiki::Search::InfoCache::sortTopics at line 327 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm, avg 3µs/call
# 67 times (50µs+0s) by Foswiki::Func::getContext at line 447 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 754ns/call
# 57 times (100µs+0s) by Foswiki::Query::Parser::new at line 46 of /var/www/foswiki11/lib/Foswiki/Query/Parser.pm, avg 2µs/call
# 50 times (50µs+0s) by Foswiki::Func::getPreferencesValue at line 756 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 1µs/call
# 49 times (53µs+0s) by Foswiki::innerExpandMacros at line 2824 of /var/www/foswiki11/lib/Foswiki.pm, avg 1µs/call
# 44 times (39µs+0s) by Foswiki::Func::registerTagHandler at line 577 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 880ns/call
# 44 times (33µs+0s) by Foswiki::Func::registerTagHandler at line 578 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 745ns/call
# 42 times (38µs+0s) by Foswiki::Templates::readTemplate at line 229 of /var/www/foswiki11/lib/Foswiki/Templates.pm, avg 917ns/call
# 41 times (36µs+0s) by Foswiki::Iterator::FilterIterator::new at line 33 of /var/www/foswiki11/lib/Foswiki/Iterator/FilterIterator.pm, avg 888ns/call
# 41 times (36µs+0s) by Foswiki::Search::searchWeb at line 241 of /var/www/foswiki11/lib/Foswiki/Search.pm, avg 888ns/call
# 41 times (30µs+0s) by Foswiki::Meta::eachTopic at line 874 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 737ns/call
# 41 times (23µs+0s) by Foswiki::Iterator::FilterIterator::new at line 34 of /var/www/foswiki11/lib/Foswiki/Iterator/FilterIterator.pm, avg 568ns/call
# 40 times (96µs+0s) by Foswiki::Iterator::reset at line 69 of /var/www/foswiki11/lib/Foswiki/Iterator.pm, avg 2µs/call
# 40 times (37µs+0s) by Foswiki::Store::SearchAlgorithms::Forking::_webQuery at line 205 of /var/www/foswiki11/lib/Foswiki/Store/SearchAlgorithms/Forking.pm, avg 925ns/call
# 40 times (27µs+0s) by Foswiki::Store::SearchAlgorithms::Forking::_webQuery at line 223 of /var/www/foswiki11/lib/Foswiki/Store/SearchAlgorithms/Forking.pm, avg 668ns/call
# 37 times (28µs+0s) by Foswiki::Plugin::new at line 77 of /var/www/foswiki11/lib/Foswiki/Plugin.pm, avg 751ns/call
# 36 times (59µs+0s) by Foswiki::Plugin::load at line 169 of /var/www/foswiki11/lib/Foswiki/Plugin.pm, avg 2µs/call
# 30 times (25µs+0s) by Foswiki::Render::_putBackProtected at line 1701 of /var/www/foswiki11/lib/Foswiki/Render.pm, avg 840ns/call
# 26 times (24µs+0s) by Foswiki::Func::getRequestObject at line 322 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 908ns/call
# 23 times (23µs+0s) by Foswiki::Time::formatTime at line 262 of /var/www/foswiki11/lib/Foswiki/Time.pm, avg 1µs/call
# 22 times (48µs+0s) by Foswiki::Sandbox::_buildCommandLine at line 427 of /var/www/foswiki11/lib/Foswiki/Sandbox.pm, avg 2µs/call
# 17 times (36µs+0s) by Foswiki::Render::_handleSquareBracketedLink at line 884 of /var/www/foswiki11/lib/Foswiki/Render.pm, avg 2µs/call
# 13 times (12µs+0s) by Foswiki::Func::registerRESTHandler at line 691 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 946ns/call
# 12 times (12µs+0s) by Foswiki::Func::addToZone at line 2655 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 1µs/call
# 11 times (87µs+0s) by Foswiki::Store::VC::Handler::getTimestamp at line 1449 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 8µs/call
# 9 times (14µs+0s) by Foswiki::_USERINFO_token at line 134 of /var/www/foswiki11/lib/Foswiki/Macros/USERINFO.pm, avg 2µs/call
# 9 times (9µs+0s) by Foswiki::_USERINFO_token at line 135 of /var/www/foswiki11/lib/Foswiki/Macros/USERINFO.pm, avg 1µs/call
# 8 times (18µs+0s) by Foswiki::If::Parser::new at line 30 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm, avg 2µs/call
# 8 times (11µs+0s) by Foswiki::UserMapping::isInGroup at line 404 of /var/www/foswiki11/lib/Foswiki/UserMapping.pm, avg 1µs/call
# 7 times (8µs+0s) by Foswiki::Meta::expandMacros at line 3101 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 6 times (6µs+0s) by Foswiki::Meta::getLoadedRev at line 2398 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 933ns/call
# 5 times (5µs+0s) by Foswiki::Meta::renderTML at line 3116 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 5 times (5µs+0s) by Foswiki::Render::getRenderedVersion at line 1106 of /var/www/foswiki11/lib/Foswiki/Render.pm, avg 1µs/call
# 5 times (4µs+0s) by Foswiki::Func::_checkWTA at line 72 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 880ns/call
# 4 times (9µs+0s) by Foswiki::ADDTOZONE at line 41 of /var/www/foswiki11/lib/Foswiki/Macros/ADDTOZONE.pm, avg 2µs/call
# 4 times (4µs+0s) by Foswiki::Time::parseTime at line 113 of /var/www/foswiki11/lib/Foswiki/Time.pm, avg 1µs/call
# 3 times (4µs+0s) by Foswiki::Users::TopicUserMapping::_getListOfGroups at line 1623 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm, avg 1µs/call
# 3 times (4µs+0s) by Foswiki::Logger::PlainFile::_getLogForLevel at line 242 of /var/www/foswiki11/lib/Foswiki/Logger/PlainFile.pm, avg 1µs/call
# 3 times (3µs+0s) by Foswiki::Func::getPluginPreferencesValue at line 789 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 867ns/call
# 2 times (5µs+0s) by Foswiki::Func::getListOfWebs at line 1474 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 3µs/call
# 2 times (3µs+0s) by Foswiki::Meta::eachWeb at line 859 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call
# 2 times (2µs+0s) by Foswiki::Func::readTopicText at line 3486 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 950ns/call
# 2 times (2µs+0s) by Foswiki::Meta::getRevisionHistory at line 2340 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 900ns/call
# 2 times (2µs+0s) by Foswiki::Meta::getEmbeddedStoreForm at line 3482 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 750ns/call
# 2 times (2µs+0s) by Foswiki::Func::expandCommonVariables at line 2516 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 750ns/call
# 2 times (1µs+0s) by Foswiki::Store::VC::Handler::getRevisionHistory at line 421 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm, avg 700ns/call
# 2 times (1µs+0s) by Foswiki::Func::expandCommonVariables at line 2518 of /var/www/foswiki11/lib/Foswiki/Func.pm, avg 650ns/call
# once (6µs+0s) by Foswiki::UI::View::view at line 131 of /var/www/foswiki11/lib/Foswiki/UI/View.pm
# once (4µs+0s) by Foswiki::Func::getWorkArea at line 2744 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (3µs+0s) by Foswiki::LoginManager::makeLoginManager at line 82 of /var/www/foswiki11/lib/Foswiki/LoginManager.pm
# once (3µs+0s) by Foswiki::Store::VC::Store::readTopic at line 117 of /var/www/foswiki11/lib/Foswiki/Store/VC/Store.pm
# once (2µs+0s) by Foswiki::BEGIN@137 at line 140 of /var/www/foswiki11/lib/Foswiki.pm
# once (2µs+0s) by Foswiki::writeCompletePage at line 854 of /var/www/foswiki11/lib/Foswiki.pm
# once (2µs+0s) by Foswiki::Plugins::enable at line 254 of /var/www/foswiki11/lib/Foswiki/Plugins.pm
# once (2µs+0s) by Foswiki::new at line 1757 of /var/www/foswiki11/lib/Foswiki.pm
# once (2µs+0s) by Foswiki::finish at line 2212 of /var/www/foswiki11/lib/Foswiki.pm
# once (2µs+0s) by Foswiki::UI::checkWebExists at line 475 of /var/www/foswiki11/lib/Foswiki/UI.pm
# once (1µs+0s) by Foswiki::Meta::hasAttachment at line 2820 of /var/www/foswiki11/lib/Foswiki/Meta.pm
# once (1µs+0s) by Foswiki::new at line 1657 of /var/www/foswiki11/lib/Foswiki.pm
# once (1µs+0s) by Foswiki::new at line 1794 of /var/www/foswiki11/lib/Foswiki.pm
# once (1µs+0s) by Foswiki::Func::setSessionValue at line 375 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Func::readTopic at line 1592 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Func::topicExists at line 1562 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Func::getUrlHost at line 140 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Users::TopicUserMapping::getLoginName at line 203 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm
# once (1µs+0s) by Foswiki::Users::TopicUserMapping::getWikiName at line 541 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm
# once (1µs+0s) by Foswiki::Store::VC::Handler::new at line 95 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm
# once (1µs+0s) by Foswiki::Func::checkAccessPermission at line 1411 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Func::clearSessionValue at line 392 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (1µs+0s) by Foswiki::Plugins::settings at line 231 of /var/www/foswiki11/lib/Foswiki/Plugins.pm
# once (800ns+0s) by Foswiki::Meta::load at line 422 of /var/www/foswiki11/lib/Foswiki/Meta.pm
# once (800ns+0s) by Foswiki::Users::TopicUserMapping::getWikiName at line 542 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm
# once (800ns+0s) by Foswiki::new at line 1731 of /var/www/foswiki11/lib/Foswiki.pm
# once (700ns+0s) by Foswiki::UI::checkAccess at line 536 of /var/www/foswiki11/lib/Foswiki/UI.pm
# once (700ns+0s) by Foswiki::Func::getCanonicalUserID at line 899 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (500ns+0s) by Foswiki::Meta::renderFormForDisplay at line 1606 of /var/www/foswiki11/lib/Foswiki/Meta.pm | ||
35 | |||||
36 | # Provides the same return value and the same context | ||||
37 | # for its parameters as the real TAINT and UNTAINTED | ||||
38 | 4 | 14µs | # spent 8µs within Assert::noop which was called 4 times, avg 2µs/call:
# 4 times (8µs+0s) by Foswiki::Engine::CLI::run at line 34 of /var/www/foswiki11/lib/Foswiki/Engine/CLI.pm, avg 2µs/call | ||
39 | |||||
40 | 1 | 500ns | our $soft = 0; | ||
41 | |||||
42 | # Export the proper DEBUG flag if FOSWIKI_ASSERTS is set, | ||||
43 | # otherwise export noop versions of our routines | ||||
44 | # spent 1.14ms within Assert::import which was called 65 times, avg 18µs/call:
# once (42µs+0s) by Foswiki::I18N::BEGIN@15 at line 15 of /var/www/foswiki11/lib/Foswiki/I18N.pm
# once (39µs+0s) by Foswiki::BEGIN@6 at line 6 of /var/www/foswiki11/lib/Foswiki/Macros/USERINFO.pm
# once (39µs+0s) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@9 at line 9 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin/Handlers.pm
# once (31µs+0s) by Foswiki::Attrs::BEGIN@49 at line 49 of /var/www/foswiki11/lib/Foswiki/Attrs.pm
# once (30µs+0s) by Foswiki::Compatibility::BEGIN@6 at line 6 of /var/www/foswiki11/lib/Foswiki/Compatibility.pm
# once (29µs+0s) by Foswiki::Engine::CLI::BEGIN@18 at line 18 of /var/www/foswiki11/lib/Foswiki/Engine/CLI.pm
# once (26µs+0s) by Foswiki::Templates::BEGIN@35 at line 35 of /var/www/foswiki11/lib/Foswiki/Templates.pm
# once (25µs+0s) by Foswiki::Form::BEGIN@38 at line 38 of /var/www/foswiki11/lib/Foswiki/Form.pm
# once (24µs+0s) by Foswiki::Query::Parser::BEGIN@15 at line 15 of /var/www/foswiki11/lib/Foswiki/Query/Parser.pm
# once (24µs+0s) by Foswiki::Query::OP_ref::BEGIN@17 at line 17 of /var/www/foswiki11/lib/Foswiki/Query/OP_ref.pm
# once (24µs+0s) by Foswiki::Query::Node::BEGIN@34 at line 34 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm
# once (23µs+0s) by Foswiki::If::Parser::BEGIN@19 at line 19 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm
# once (23µs+0s) by Foswiki::Infix::Parser::BEGIN@18 at line 18 of /var/www/foswiki11/lib/Foswiki/Infix/Parser.pm
# once (22µs+0s) by Foswiki::BEGIN@7.42 at line 7 of /var/www/foswiki11/lib/Foswiki/Macros/ADDTOZONE.pm
# once (22µs+0s) by Foswiki::Plugins::WysiwygPlugin::Constants::BEGIN@9 at line 9 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm
# once (20µs+0s) by Foswiki::BEGIN@46 at line 46 of /var/www/foswiki11/lib/Foswiki.pm
# once (19µs+0s) by Foswiki::If::OP_allows::BEGIN@17 at line 17 of /var/www/foswiki11/lib/Foswiki/If/OP_allows.pm
# once (19µs+0s) by Foswiki::Sandbox::BEGIN@33 at line 33 of /var/www/foswiki11/lib/Foswiki/Sandbox.pm
# once (19µs+0s) by Foswiki::Plugins::JHotDrawPlugin::BEGIN@26 at line 26 of /var/www/foswiki11/lib/Foswiki/Plugins/JHotDrawPlugin.pm
# once (19µs+0s) by Foswiki::Prefs::Parser::BEGIN@20 at line 20 of /var/www/foswiki11/lib/Foswiki/Prefs/Parser.pm
# once (16µs+0s) by Foswiki::Prefs::BEGIN@68 at line 68 of /var/www/foswiki11/lib/Foswiki/Prefs.pm
# once (16µs+0s) by Foswiki::Request::Upload::BEGIN@15 at line 15 of /var/www/foswiki11/lib/Foswiki/Request/Upload.pm
# once (16µs+0s) by Foswiki::Iterator::BEGIN@23 at line 23 of /var/www/foswiki11/lib/Foswiki/Iterator.pm
# once (16µs+0s) by Foswiki::Plugins::TinyMCEPlugin::BEGIN@8 at line 8 of /var/www/foswiki11/lib/Foswiki/Plugins/TinyMCEPlugin.pm
# once (16µs+0s) by Foswiki::Engine::BEGIN@20 at line 20 of /var/www/foswiki11/lib/Foswiki/Engine.pm
# once (16µs+0s) by Foswiki::Render::Anchors::BEGIN@18 at line 18 of /var/www/foswiki11/lib/Foswiki/Render/Anchors.pm
# once (16µs+0s) by Foswiki::Render::BEGIN@14 at line 14 of /var/www/foswiki11/lib/Foswiki/Render.pm
# once (16µs+0s) by Foswiki::Request::BEGIN@35 at line 35 of /var/www/foswiki11/lib/Foswiki/Request.pm
# once (16µs+0s) by Foswiki::Users::BaseUserMapping::BEGIN@36 at line 36 of /var/www/foswiki11/lib/Foswiki/Users/BaseUserMapping.pm
# once (16µs+0s) by Foswiki::Search::BEGIN@14 at line 14 of /var/www/foswiki11/lib/Foswiki/Search.pm
# once (15µs+0s) by Foswiki::OopsException::BEGIN@97 at line 97 of /var/www/foswiki11/lib/Foswiki/OopsException.pm
# once (15µs+0s) by Foswiki::Store::SearchAlgorithms::Forking::BEGIN@7 at line 7 of /var/www/foswiki11/lib/Foswiki/Store/SearchAlgorithms/Forking.pm
# once (14µs+0s) by Foswiki::Iterator::NumberRangeIterator::BEGIN@17 at line 17 of /var/www/foswiki11/lib/Foswiki/Iterator/NumberRangeIterator.pm
# once (14µs+0s) by Foswiki::Response::BEGIN@21 at line 21 of /var/www/foswiki11/lib/Foswiki/Response.pm
# once (14µs+0s) by Foswiki::Logger::PlainFile::BEGIN@7 at line 7 of /var/www/foswiki11/lib/Foswiki/Logger/PlainFile.pm
# once (14µs+0s) by Foswiki::Plugins::ActionTrackerPlugin::BEGIN@5 at line 5 of /var/www/foswiki11/lib/Foswiki/Plugins/ActionTrackerPlugin.pm
# once (14µs+0s) by Foswiki::Store::VC::Handler::BEGIN@28 at line 28 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm
# once (14µs+0s) by Foswiki::Logger::BEGIN@7 at line 7 of /var/www/foswiki11/lib/Foswiki/Logger.pm
# once (14µs+0s) by Foswiki::Users::TopicUserMapping::BEGIN@33 at line 33 of /var/www/foswiki11/lib/Foswiki/Users/TopicUserMapping.pm
# once (14µs+0s) by Foswiki::LoginManager::ApacheLogin::BEGIN@26 at line 26 of /var/www/foswiki11/lib/Foswiki/LoginManager/ApacheLogin.pm
# once (14µs+0s) by Foswiki::Users::Password::BEGIN@19 at line 19 of /var/www/foswiki11/lib/Foswiki/Users/Password.pm
# once (14µs+0s) by Foswiki::Plugins::WysiwygPlugin::BEGIN@28 at line 28 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin.pm
# once (14µs+0s) by Foswiki::Form::ListFieldDefinition::BEGIN@16 at line 16 of /var/www/foswiki11/lib/Foswiki/Form/ListFieldDefinition.pm
# once (14µs+0s) by Foswiki::Search::ResultSet::BEGIN@24 at line 24 of /var/www/foswiki11/lib/Foswiki/Search/ResultSet.pm
# once (14µs+0s) by Foswiki::Time::BEGIN@36 at line 36 of /var/www/foswiki11/lib/Foswiki/Time.pm
# once (13µs+0s) by Foswiki::Prefs::BaseBackend::BEGIN@16 at line 16 of /var/www/foswiki11/lib/Foswiki/Prefs/BaseBackend.pm
# once (13µs+0s) by Foswiki::Store::VC::Store::BEGIN@39 at line 39 of /var/www/foswiki11/lib/Foswiki/Store/VC/Store.pm
# once (13µs+0s) by Foswiki::Meta::BEGIN@116 at line 116 of /var/www/foswiki11/lib/Foswiki/Meta.pm
# once (13µs+0s) by Foswiki::Form::FieldDefinition::BEGIN@20 at line 20 of /var/www/foswiki11/lib/Foswiki/Form/FieldDefinition.pm
# once (13µs+0s) by Foswiki::Plugins::BEGIN@19 at line 19 of /var/www/foswiki11/lib/Foswiki/Plugins.pm
# once (13µs+0s) by Foswiki::UI::View::BEGIN@17 at line 17 of /var/www/foswiki11/lib/Foswiki/UI/View.pm
# once (13µs+0s) by Foswiki::Iterator::FilterIterator::BEGIN@15 at line 15 of /var/www/foswiki11/lib/Foswiki/Iterator/FilterIterator.pm
# once (13µs+0s) by Foswiki::UserMapping::BEGIN@37 at line 37 of /var/www/foswiki11/lib/Foswiki/UserMapping.pm
# once (13µs+0s) by Foswiki::Search::InfoCache::BEGIN@23 at line 23 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm
# once (13µs+0s) by Foswiki::Validation::BEGIN@7 at line 7 of /var/www/foswiki11/lib/Foswiki/Validation.pm
# once (13µs+0s) by Foswiki::Search::Node::BEGIN@18 at line 18 of /var/www/foswiki11/lib/Foswiki/Search/Node.pm
# once (12µs+0s) by Foswiki::Attach::BEGIN@15 at line 15 of /var/www/foswiki11/lib/Foswiki/Attach.pm
# once (12µs+0s) by Foswiki::MetaCache::BEGIN@20 at line 20 of /var/www/foswiki11/lib/Foswiki/MetaCache.pm
# once (12µs+0s) by Foswiki::LoginManager::BEGIN@53 at line 53 of /var/www/foswiki11/lib/Foswiki/LoginManager.pm
# once (12µs+0s) by Foswiki::ListIterator::BEGIN@22 at line 22 of /var/www/foswiki11/lib/Foswiki/ListIterator.pm
# once (12µs+0s) by Foswiki::UI::BEGIN@150 at line 150 of /var/www/foswiki11/lib/Foswiki/UI.pm
# once (12µs+0s) by Foswiki::Users::BEGIN@61 at line 61 of /var/www/foswiki11/lib/Foswiki/Users.pm
# once (12µs+0s) by Foswiki::Store::BEGIN@56 at line 56 of /var/www/foswiki11/lib/Foswiki/Store.pm
# once (12µs+0s) by Foswiki::Func::BEGIN@58 at line 58 of /var/www/foswiki11/lib/Foswiki/Func.pm
# once (12µs+0s) by Foswiki::Plugin::BEGIN@10 at line 10 of /var/www/foswiki11/lib/Foswiki/Plugin.pm | ||||
45 | 2 | 53µs | 2 | 51µs | # spent 34µs (16+17) within Assert::BEGIN@45 which was called:
# once (16µs+17µs) by Foswiki::BEGIN@46 at line 45 # spent 34µs making 1 call to Assert::BEGIN@45
# spent 17µs making 1 call to warnings::unimport |
46 | 2 | 193µs | 2 | 49µs | # spent 31µs (13+18) within Assert::BEGIN@46 which was called:
# once (13µs+18µs) by Foswiki::BEGIN@46 at line 46 # spent 31µs making 1 call to Assert::BEGIN@46
# spent 18µs making 1 call to strict::unimport |
47 | 65 | 436µs | if ( $ENV{FOSWIKI_ASSERTS} || $ENV{TWIKI_ASSERTS} ) { | ||
48 | $soft = 1 if $ENV{FOSWIKI_ASSERTS} and $ENV{FOSWIKI_ASSERTS} eq 'soft'; | ||||
49 | *DEBUG = *ASSERTS_ON; | ||||
50 | Assert->export_to_level( 1, @_ ); | ||||
51 | } | ||||
52 | else { | ||||
53 | 65 | 214µs | my $caller = caller; | ||
54 | 65 | 283µs | *{ $caller . '::ASSERT' } = \&dummyASSERT; | ||
55 | 65 | 166µs | *{ $caller . '::TAINT' } = \&noop; | ||
56 | 65 | 134µs | *{ $caller . '::UNTAINTED' } = \&noop; | ||
57 | 65 | 169µs | *{ $caller . '::DEBUG' } = \&ASSERTS_OFF; | ||
58 | } | ||||
59 | 2 | 44µs | 2 | 51µs | # spent 32µs (14+18) within Assert::BEGIN@59 which was called:
# once (14µs+18µs) by Foswiki::BEGIN@46 at line 59 # spent 32µs making 1 call to Assert::BEGIN@59
# spent 18µs making 1 call to strict::import |
60 | 2 | 385µs | 2 | 60µs | # spent 36µs (12+24) within Assert::BEGIN@60 which was called:
# once (12µs+24µs) by Foswiki::BEGIN@46 at line 60 # spent 36µs making 1 call to Assert::BEGIN@60
# spent 24µs making 1 call to warnings::import |
61 | } | ||||
62 | |||||
63 | # Provides the same return value and the same context | ||||
64 | # for its parameters as the real ASSERT | ||||
65 | # spent 23.9ms within Assert::dummyASSERT which was called 26595 times, avg 897ns/call:
# 26433 times (23.5ms+0s) by Foswiki::Query::Node::evaluate at line 145 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 889ns/call
# 81 times (289µs+0s) by Foswiki::Search::InfoCache::sortTopics at line 303 of /var/www/foswiki11/lib/Foswiki/Search/InfoCache.pm, avg 4µs/call
# 40 times (44µs+0s) by Foswiki::Store::VC::Store::searchInWebMetaData at line 465 of /var/www/foswiki11/lib/Foswiki/Store/VC/Store.pm, avg 1µs/call
# 40 times (25µs+0s) by Foswiki::Store::VC::Store::searchInWebMetaData at line 466 of /var/www/foswiki11/lib/Foswiki/Store/VC/Store.pm, avg 618ns/call
# once (1µs+0s) by Foswiki::Users::getLoginName at line 676 of /var/www/foswiki11/lib/Foswiki/Users.pm | ||||
66 | 26595 | 79.8ms | return; | ||
67 | } | ||||
68 | |||||
69 | sub ASSERT ($;$) { | ||||
70 | unless ( $_[0] ) { | ||||
71 | require Carp; | ||||
72 | my $msg = 'Assertion'; | ||||
73 | $msg .= " ($_[1])" if defined $_[1]; | ||||
74 | $msg .= " failed!\n"; | ||||
75 | if ($soft) { | ||||
76 | Carp::cluck($msg); | ||||
77 | } | ||||
78 | else { | ||||
79 | Carp::confess($msg); | ||||
80 | } | ||||
81 | } | ||||
82 | return; | ||||
83 | } | ||||
84 | |||||
85 | # Test if a value is untainted | ||||
86 | sub UNTAINTED($) { | ||||
87 | local ( @_, $@, $^W ) = @_; | ||||
88 | my $x; | ||||
89 | return eval { $x = $_[0], kill 0; 1 }; | ||||
90 | } | ||||
91 | |||||
92 | # Taint the datum passed and return the tainted value | ||||
93 | sub TAINT($) { | ||||
94 | return substr( $_[0] . $DIRTY, 0, length( $_[0] ) ); | ||||
95 | } | ||||
96 | |||||
97 | 1 | 11µs | 1; | ||
98 | __END__ |