Here are old profiles we can sort or delete.
To use profiles, we must know which patch they were made with. Profiles make sense when we can compare the change from one patch to another.
Contents
Different setups
Refactor into separate pages. too long to use like that. Then we can compare profiles of different version to see how we are doing.
Nir
- G5 Dual 2G, 1.5G RAM
- Mac OS X 10.3.3
- Python 2.3.0 (default installed python)
MoinMoin fix branch, same as moin--main--1.3--patch-258 + profiling code
- wiki: 523 pages, 429 system pages
- config: caching on
- Using Standalone
Some tests using Twisted, running with twistd -y mointwisted.py -n. The profiler is not compatible with the daemon mode.
Alexander
- Athlon 1800+, 1.5 GHz
- 512 MB RAM
- Windows XP
- Python 2.3
MoinMoin 1.3--patch257
- Using Standalone
Pages
FrontPage Standalone (Nir)
This is a a small page that has many hits.
With first request (including startup code on first request)
ab -n 100 -c 1 http://localhost:8000/FrontPage
208607 function calls (198965 primitive calls) in 5.917 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) 7904/3802 1.733 0.000 2.379 0.001 Page.py:78(get_rev) 427 1.073 0.003 1.088 0.003 pysupport.py:23(getPackageModules) 646 0.269 0.000 1.347 0.002 pysupport.py:37(importName) 11205 0.268 0.000 0.268 0.000 posixpath.py:171(exists) 32116 0.231 0.000 0.231 0.000 posixpath.py:56(join) 7704/3902 0.164 0.000 2.138 0.001 Page.py:109(getPagePath) 5100 0.125 0.000 0.125 0.000 socket.py:237(flush) 7704 0.120 0.000 0.121 0.000 wikiutil.py:154(quoteWikinameFS) 3600 0.086 0.000 0.086 0.000 wikiutil.py:75(quoteWikinameURL) 421/52 0.068 0.000 0.153 0.003 sre_parse.py:367(_parse) 4700 0.064 0.000 0.064 0.000 request.py:419(encode) 2300 0.058 0.000 0.091 0.000 wikiutil.py:765(link_tag) 100 0.056 0.001 5.845 0.058 Page.py:562(send_page) 4 0.054 0.014 0.072 0.018 sre_compile.py:271(_optimize_unicode) 1523 0.047 0.000 0.071 0.000 warnings.py:24(warn) 400 0.046 0.000 0.117 0.000 logfile.py:17(__init__) 1700 0.043 0.000 2.029 0.001 Page.py:470(link_to) 100 0.042 0.000 1.577 0.016 wikiutil.py:902(send_title) 400 0.042 0.000 0.048 0.000 logfile.py:44(__calculate_offsets) 1200 0.042 0.000 1.892 0.002 text_html.py:212(pagelink) Function was called by... Page.py:78(get_rev) Page.py:109(getPagePath)(4702) 2.138 Page.py:188(_text_filename)(3202) 2.334 pysupport.py:23(getPackageModules) __init__.py:3(?)(200) 1.076 __init__.py:8(?)(1) 0.000 __init__.py:9(?)(1) 0.121 __init__.py:10(?)(1) 0.000 __init__.py:18(?)(1) 0.001 wikiaction.py:801(getPlugins)(100) 0.026 pysupport.py:37(importName) wikiutil.py:508(importPlugin)(400) 0.231 wikiutil.py:529(builtinPlugins)(123) 0.004 wikiutil.py:543(extensionPlugins)(123) 1.119 posixpath.py:171(exists) Page.py:78(get_rev)(7904) 2.379 Page.py:109(getPagePath)(300) 2.138 Page.py:297(exists)(2501) 2.167 Page.py:1080(getACL)(300) 0.114 caching.py:37(exists)(200) 0.006 posixpath.py:56(join) Page.py:78(get_rev)(15808) 2.379 Page.py:109(getPagePath)(15408) 2.138 caching.py:34(_filename)(700) 0.006 wikiaction.py:801(getPlugins)(200) 0.026 Page.py:109(getPagePath) AttachFile.py:50(getAttachDir)(100) 0.042 Page.py:78(get_rev)(3202) 2.379 Page.py:109(getPagePath)(3802) 2.138 Page.py:217(_last_edited)(200) 0.251 Page.py:887(send_page_content)(100) 3.325 caching.py:13(__init__)(200) 0.052 eventlog.py:13(__init__)(100) 0.013 socket.py:237(flush) request.py:1472(flush)(200) 0.001 request.py:1475(finish)(100) 0.003 socket.py:246(write)(4800) 0.164 wikiutil.py:154(quoteWikinameFS) Page.py:109(getPagePath)(7704) 2.138 wikiutil.py:75(quoteWikinameURL) Page.py:470(link_to)(1700) 2.029 Page.py:562(send_page)(100) 5.845 Page.py:887(send_page_content)(100) 3.325 __init__.py:131(logo)(100) 0.011 __init__.py:842(editbar)(100) 0.458 wikiutil.py:902(send_title)(1500) 1.577 sre_parse.py:367(_parse) sre_parse.py:312(_parse_sub)(421) 0.154 request.py:419(encode) request.py:1467(write)(4700) 0.221 wikiutil.py:765(link_tag) Page.py:470(link_to)(1700) 2.029 Page.py:887(send_page_content)(100) 3.325 __init__.py:131(logo)(100) 0.011 __init__.py:842(editbar)(400) 0.458 Page.py:562(send_page) request.py:645(run)(100) 5.917 sre_compile.py:271(_optimize_unicode) sre_compile.py:180(_optimize_charset)(4) 0.095 warnings.py:24(warn) editlog.py:113(parser)(200) 0.032 text_html.py:20(__init__)(123) 0.012 text_html.py:212(pagelink)(1200) 1.892 logfile.py:17(__init__) logfile.py:268(to_end)(400) 0.146 Page.py:470(link_to) __init__.py:172(username)(100) 0.062 __init__.py:205(splitNavilink)(400) 0.221 text_html.py:212(pagelink)(1200) 1.892 wikiutil.py:902(send_title) Page.py:562(send_page)(100) 5.845 logfile.py:44(__calculate_offsets) logfile.py:17(__init__)(400) 0.117 text_html.py:212(pagelink) FrontPage:2(?)(1200) 2.046
Without first request Standalone (no startup code)
ab -n 100 -c 1 http://localhost:8000/FrontPage
168058 function calls (160237 primitive calls) in 5.468 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) 31779 1.229 0.000 1.229 0.000 posixpath.py:56(join) 396 1.020 0.003 1.028 0.003 codecs.py:531(open) 7821/3762 0.730 0.000 2.375 0.001 Page.py:78(get_rev) 11088 0.266 0.000 0.266 0.000 posixpath.py:171(exists) 594 0.247 0.000 0.318 0.001 pysupport.py:37(importName) 7623/3861 0.162 0.000 2.136 0.001 Page.py:109(getPagePath) 7623 0.124 0.000 0.124 0.000 wikiutil.py:154(quoteWikinameFS) 5049 0.120 0.000 0.120 0.000 socket.py:237(flush) 3564 0.085 0.000 0.085 0.000 wikiutil.py:75(quoteWikinameURL) 396 0.067 0.000 0.081 0.000 pysupport.py:23(getPackageModules) 4653 0.065 0.000 0.065 0.000 request.py:419(encode) 2277 0.057 0.000 0.096 0.000 wikiutil.py:765(link_tag) 396 0.055 0.000 0.130 0.000 logfile.py:17(__init__) 99 0.052 0.001 5.400 0.055 Page.py:562(send_page) 1485 0.046 0.000 0.069 0.000 warnings.py:24(warn) 396 0.045 0.000 0.052 0.000 logfile.py:44(__calculate_offsets) 1188 0.043 0.000 1.905 0.002 text_html.py:212(pagelink) 1683 0.042 0.000 2.041 0.001 Page.py:470(link_to) 99 0.040 0.000 1.169 0.012 wikiutil.py:902(send_title) 3069 0.039 0.000 0.039 0.000 wikiutil.py:113(escape) Function was called by... posixpath.py:56(join) Page.py:78(get_rev)(15642) 2.375 Page.py:109(getPagePath)(15246) 2.136 caching.py:34(_filename)(693) 0.006 wikiaction.py:801(getPlugins)(198) 0.025 codecs.py:531(open) Page.py:411(get_raw_body)(99) 0.064 logfile.py:99(__getattr__)(297) 1.027 Page.py:78(get_rev) Page.py:109(getPagePath)(4653) 2.136 Page.py:188(_text_filename)(3168) 2.328 posixpath.py:171(exists) Page.py:78(get_rev)(7821) 2.375 Page.py:109(getPagePath)(297) 2.136 Page.py:297(exists)(2475) 2.162 Page.py:1080(getACL)(297) 0.112 caching.py:37(exists)(198) 0.006 pysupport.py:37(importName) wikiutil.py:508(importPlugin)(396) 0.227 wikiutil.py:529(builtinPlugins)(99) 0.003 wikiutil.py:543(extensionPlugins)(99) 0.095 Page.py:109(getPagePath) AttachFile.py:50(getAttachDir)(99) 0.040 Page.py:78(get_rev)(3168) 2.375 Page.py:109(getPagePath)(3762) 2.136 Page.py:217(_last_edited)(198) 0.261 Page.py:887(send_page_content)(99) 2.327 caching.py:13(__init__)(198) 0.051 eventlog.py:13(__init__)(99) 0.013 wikiutil.py:154(quoteWikinameFS) Page.py:109(getPagePath)(7623) 2.136 socket.py:237(flush) request.py:1472(flush)(198) 0.001 request.py:1475(finish)(99) 0.003 socket.py:246(write)(4752) 0.158 wikiutil.py:75(quoteWikinameURL) Page.py:470(link_to)(1683) 2.041 Page.py:562(send_page)(99) 5.400 Page.py:887(send_page_content)(99) 2.327 __init__.py:131(logo)(99) 0.011 __init__.py:842(editbar)(99) 0.423 wikiutil.py:902(send_title)(1485) 1.169 pysupport.py:23(getPackageModules) __init__.py:3(?)(99) 0.070 wikiaction.py:801(getPlugins)(99) 0.025 request.py:419(encode) request.py:1467(write)(4653) 0.219 wikiutil.py:765(link_tag) Page.py:470(link_to)(1683) 2.041 Page.py:887(send_page_content)(99) 2.327 __init__.py:131(logo)(99) 0.011 __init__.py:842(editbar)(396) 0.423 logfile.py:17(__init__) logfile.py:268(to_end)(396) 0.157 Page.py:562(send_page) request.py:645(run)(99) 5.468 warnings.py:24(warn) editlog.py:113(parser)(198) 0.032 text_html.py:20(__init__)(99) 0.010 text_html.py:212(pagelink)(1188) 1.905 logfile.py:44(__calculate_offsets) logfile.py:17(__init__)(396) 0.130 text_html.py:212(pagelink) FrontPage:2(?)(1188) 2.059 Page.py:470(link_to) __init__.py:172(username)(99) 0.061 __init__.py:205(splitNavilink)(396) 0.221 text_html.py:212(pagelink)(1188) 1.905 wikiutil.py:902(send_title) Page.py:562(send_page)(99) 5.400 wikiutil.py:113(escape) Page.py:470(link_to)(1683) 2.041 __init__.py:150(title)(99) 0.006 __init__.py:503(searchform)(99) 0.006 editlog.py:55(getEditor)(396) 0.011 text_html.py:251(url)(594) 0.029 wikiutil.py:902(send_title)(198) 1.169
FrontPage Twisted (Nir)
ab -n 100 -c 1 http://localhost:8080/FrontPage
211962 function calls (202946 primitive calls) in 10.212 CPU seconds Ordered by: internal time, call count List reduced from 409 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 11205 1.462 0.000 1.462 0.000 posixpath.py:171(exists) 7904/3802 1.254 0.000 4.140 0.001 Page.py:78(get_rev) 7704 1.140 0.000 1.140 0.000 wikiutil.py:154(quoteWikinameFS) 4500 1.064 0.000 1.720 0.000 request.py:1193(write) 3123 1.043 0.000 1.043 0.000 wikiutil.py:113(escape) 300 1.002 0.003 1.002 0.003 request.py:35(stop) 4600 0.468 0.000 0.468 0.000 default.py:394(wakeUp) 646 0.302 0.000 0.388 0.001 pysupport.py:37(importName) 32116 0.259 0.000 0.259 0.000 posixpath.py:56(join) 7704/3902 0.189 0.000 3.795 0.001 Page.py:109(getPagePath) 3600 0.100 0.000 0.100 0.000 wikiutil.py:75(quoteWikinameURL) 4500 0.080 0.000 0.080 0.000 request.py:419(encode) 427 0.079 0.000 0.096 0.000 pysupport.py:23(getPackageModules) 2300 0.063 0.000 0.097 0.000 wikiutil.py:765(link_tag) 100 0.062 0.001 10.058 0.101 Page.py:562(send_page) 4 0.056 0.014 0.075 0.019 sre_compile.py:271(_optimize_unicode) 4600 0.056 0.000 0.536 0.000 base.py:203(wakeUp) 315/46 0.054 0.000 0.128 0.003 sre_parse.py:367(_parse) 1523 0.054 0.000 0.081 0.000 warnings.py:24(warn) 1200 0.049 0.000 1.372 0.001 text_html.py:212(pagelink) Ordered by: internal time, call count List reduced from 409 to 20 due to restriction <20> Function was called by... posixpath.py:171(exists) Page.py:78(get_rev)(7904) 4.140 Page.py:109(getPagePath)(300) 3.795 Page.py:297(exists)(2501) 3.800 Page.py:1080(getACL)(300) 0.192 caching.py:37(exists)(200) 0.007 Page.py:78(get_rev) Page.py:109(getPagePath)(4702) 3.795 Page.py:188(_text_filename)(3202) 4.043 wikiutil.py:154(quoteWikinameFS) Page.py:109(getPagePath)(7704) 3.795 request.py:1193(write) FrontPage:2(?)(2500) 2.784 Page.py:562(send_page)(400) 10.058 request.py:645(run)(600) 10.212 wikiutil.py:902(send_title)(800) 2.820 wikiutil.py:1103(send_footer)(200) 1.346 wikiutil.py:113(escape) Page.py:470(link_to)(1700) 1.511 __init__.py:150(title)(100) 0.008 __init__.py:503(searchform)(100) 0.013 editlog.py:55(getEditor)(400) 1.012 text_html.py:251(url)(600) 0.027 text_html.py:295(_text)(23) 0.000 wikiutil.py:902(send_title)(200) 2.820 request.py:35(stop) Page.py:562(send_page)(100) 10.058 request.py:645(run)(200) 10.212 default.py:394(wakeUp) base.py:203(wakeUp)(4600) 0.536 pysupport.py:37(importName) wikiutil.py:508(importPlugin)(400) 0.258 wikiutil.py:529(builtinPlugins)(123) 0.006 wikiutil.py:543(extensionPlugins)(123) 0.134 posixpath.py:56(join) Page.py:78(get_rev)(15808) 4.140 Page.py:109(getPagePath)(15408) 3.795 caching.py:34(_filename)(700) 0.008 wikiaction.py:801(getPlugins)(200) 0.027 Page.py:109(getPagePath) AttachFile.py:50(getAttachDir)(100) 0.073 Page.py:78(get_rev)(3202) 4.140 Page.py:109(getPagePath)(3802) 3.795 Page.py:217(_last_edited)(200) 0.224 Page.py:887(send_page_content)(100) 3.110 caching.py:13(__init__)(200) 0.064 eventlog.py:13(__init__)(100) 0.023 wikiutil.py:75(quoteWikinameURL) Page.py:470(link_to)(1700) 1.511 Page.py:562(send_page)(100) 10.058 Page.py:887(send_page_content)(100) 3.110 __init__.py:131(logo)(100) 0.012 __init__.py:842(editbar)(100) 0.503 wikiutil.py:902(send_title)(1500) 2.820 request.py:419(encode) request.py:1193(write)(4500) 1.720 pysupport.py:23(getPackageModules) __init__.py:3(?)(200) 0.085 __init__.py:8(?)(1) 0.000 __init__.py:9(?)(1) 0.030 __init__.py:10(?)(1) 0.000 __init__.py:18(?)(1) 0.001 wikiaction.py:801(getPlugins)(100) 0.027 wikiutil.py:765(link_tag) Page.py:470(link_to)(1700) 1.511 Page.py:887(send_page_content)(100) 3.110 __init__.py:131(logo)(100) 0.012 __init__.py:842(editbar)(400) 0.503 Page.py:562(send_page) request.py:645(run)(100) 10.212 sre_compile.py:271(_optimize_unicode) sre_compile.py:180(_optimize_charset)(4) 0.082 base.py:203(wakeUp) base.py:190(callFromThread)(4600) 0.601 sre_parse.py:367(_parse) sre_parse.py:312(_parse_sub)(315) 0.129 warnings.py:24(warn) editlog.py:113(parser)(200) 0.032 text_html.py:20(__init__)(123) 0.013 text_html.py:212(pagelink)(1200) 1.372 text_html.py:212(pagelink) FrontPage:2(?)(1200) 2.784
Frontpage (Alexander)
- 1 request, including startup penalty
ncalls tottime percall cumtime percall filename:lineno(function) 766/632 0.461 0.001 1.067 0.002 page.py:78(get_rev) 846 0.433 0.001 0.433 0.001 ntpath.py:253(exists) 3343/1 0.127 0.000 0.319 0.319 pickle.py:276(save) 2489 0.107 0.000 0.243 0.000 ntpath.py:58(join) 517 0.105 0.000 0.143 0.000 wikiutil.py:187(unquoteWikiname) 81 0.096 0.001 0.096 0.001 socket.py:224(flush) 48 0.093 0.002 0.097 0.002 wikiutil.py:765(link_tag) 2 0.089 0.045 0.342 0.171 pickle.py:859(load) 1973 0.071 0.000 0.073 0.000 pickle.py:993(load_unicode) 3474 0.069 0.000 0.069 0.000 ntpath.py:115(splitdrive) 3455 0.068 0.000 0.136 0.000 ntpath.py:50(isabs) 2037 0.054 0.000 0.054 0.000 pickle.py:1184(load_put) 2 0.051 0.026 1.005 0.502 page.py:1130(listPages) 1013 0.051 0.000 0.095 0.000 pickle.py:506(save_unicode) 2295 0.051 0.000 0.051 0.000 pickle.py:1213(load_setitem) 1614 0.046 0.000 0.046 0.000 pickle.py:925(load_int) 10 0.042 0.004 0.110 0.011 pysupport.py:37(importName) 519 0.037 0.000 0.037 0.000 wikiutil.py:56(decodeUserInput) 34/1 0.036 0.001 0.319 0.319 pickle.py:669(_batch_setitems) 1 0.032 0.032 0.037 0.037 wikimacro.py:13(?) page.py:78(get_rev) page.py:109(getPagePath)(140) 0.260 page.py:188(_text_filename)(90) 0.310 page.py:1130(listPages)(536) 1.005 ntpath.py:253(exists) caching.py:37(exists)(3) 0.001 page.py:78(get_rev)(766) 1.067 page.py:109(getPagePath)(4) 0.260 page.py:297(exists)(66) 0.274 page.py:1080(getACL)(3) 0.021 user.py:249(exists)(3) 0.002 user.py:590(getTrail)(1) 0.002 ntpath.py:58(join) __init__.py:110(loadLanguage)(1) 0.122 caching.py:13(__init__)(3) 0.009 caching.py:34(_filename)(13) 0.002 multiconfig.py:227(__init__)(3) 0.010 page.py:78(get_rev)(1532) 1.067 page.py:109(getPagePath)(388) 0.260 page.py:350(getPageList)(1) 1.027 page.py:1130(listPages)(536) 1.005 user.py:240(__filename)(8) 0.001 wikiaction.py:801(getPlugins)(4) 0.003
- Page.get_rev is called very often
RecentChangges Standalone (Nir)
ab -n 100 -c 1 http://localhost:8000/RecentChanges
3277336 function calls (3057391 primitive calls) in 137.808 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) ----- /!\ End of edit conflict ----- 272901/139062 48.413 0.000 85.999 0.001 Page.py:78(get_rev) 356831 18.391 0.000 18.393 0.000 posixpath.py:171(exists) 940344 12.594 0.000 12.594 0.000 posixpath.py:56(join) 169018/84659 7.702 0.000 55.282 0.001 Page.py:109(getPagePath) 64200 5.948 0.000 6.932 0.000 wikiacl.py:185(may) 64200 4.946 0.000 6.699 0.000 wikiutil.py:187(unquoteWikiname) 169018 4.600 0.000 4.600 0.000 wikiutil.py:154(quoteWikinameFS) 200 3.807 0.019 89.094 0.445 Page.py:1130(listPages) 60806 2.995 0.000 2.995 0.000 posixpath.py:144(getmtime) 64200 2.312 0.000 71.575 0.001 Page.py:1080(getACL) 64200 2.013 0.000 81.078 0.001 security.py:52(<lambda>) 64200 1.753 0.000 1.753 0.000 wikiutil.py:56(decodeUserInput) 64200 1.585 0.000 1.585 0.000 security.py:45(__getattr__) 1224 1.414 0.001 1.414 0.001 codecs.py:232(read) 3900 1.148 0.000 1.298 0.000 base.py:97(image) 600 1.133 0.002 1.385 0.002 logfile.py:17(__init__) 6 1.073 0.179 1.098 0.183 sre_compile.py:271(_optimize_unicode) 8800 1.070 0.000 1.186 0.000 Page.py:51(split_title) 10300 1.067 0.000 6.584 0.001 logfile.py:80(reverse) 400 1.050 0.003 1.363 0.003 user.py:144(__init__)
RecentChanges Twisted (Nir)
ab -n 100 -c 1 http://localhost:8080/RecentChanges
3285131 function calls (3065818 primitive calls) in 144.595 CPU seconds Ordered by: internal time, call count List reduced from 451 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 272896/139058 56.697 0.000 93.667 0.001 Page.py:78(get_rev) 356823 18.756 0.000 18.756 0.000 posixpath.py:171(exists) 940312 9.759 0.000 9.759 0.000 posixpath.py:56(join) 169010 8.661 0.000 8.661 0.000 wikiutil.py:154(quoteWikinameFS) 64200 6.970 0.000 7.708 0.000 wikiutil.py:187(unquoteWikiname) 200 4.799 0.024 90.282 0.451 Page.py:1130(listPages) 169010/84655 4.673 0.000 68.163 0.001 Page.py:109(getPagePath) 64200 3.042 0.000 4.980 0.000 wikiacl.py:185(may) 1852 1.984 0.001 2.234 0.001 pysupport.py:37(importName) 83752 1.764 0.000 83.494 0.001 Page.py:188(_text_filename) 74327 1.709 0.000 1.709 0.000 Page.py:24(__init__) 6400 1.642 0.000 1.642 0.000 default.py:394(wakeUp) 12400 1.352 0.000 1.497 0.000 wikiutil.py:765(link_tag) 64200 1.334 0.000 72.753 0.001 Page.py:1080(getACL) 400 1.215 0.003 1.327 0.003 user.py:270(load_from_id) 1224 1.194 0.001 1.194 0.001 codecs.py:232(read) 6500 1.178 0.000 7.638 0.001 wikiutil.py:462(getHomePage) 60800 1.089 0.000 1.089 0.000 posixpath.py:144(getmtime) 12400 1.082 0.000 1.082 0.000 wikiutil.py:259(version2timestamp) 24200 1.067 0.000 1.067 0.000 wikidicts.py:133(has_member) Ordered by: internal time, call count List reduced from 451 to 20 due to restriction <20> Function was called by... Page.py:78(get_rev) Page.py:109(getPagePath)(134444) 68.163 Page.py:188(_text_filename)(83752) 83.494 Page.py:1130(listPages)(54700) 90.282 posixpath.py:171(exists) Page.py:78(get_rev)(272896) 93.667 Page.py:109(getPagePath)(500) 68.163 Page.py:297(exists)(18627) 18.065 Page.py:1080(getACL)(64200) 72.753 caching.py:37(exists)(200) 0.007 user.py:249(exists)(400) 0.029 posixpath.py:56(join) Page.py:78(get_rev)(545792) 93.667 Page.py:109(getPagePath)(338020) 68.163 Page.py:350(getPageList)(100) 90.340 Page.py:1130(listPages)(54700) 90.282 caching.py:34(_filename)(700) 0.008 user.py:240(__filename)(800) 0.013 wikiaction.py:801(getPlugins)(200) 0.029 wikiutil.py:154(quoteWikinameFS) Page.py:109(getPagePath)(169010) 68.163 wikiutil.py:187(unquoteWikiname) Page.py:1130(listPages)(53700) 90.282 editlog.py:113(parser)(10500) 1.545 Page.py:1130(listPages) Page.py:350(getPageList)(200) 90.340 Page.py:109(getPagePath) AttachFile.py:50(getAttachDir)(100) 1.073 Page.py:78(get_rev)(83752) 93.667 Page.py:109(getPagePath)(84355) 68.163 Page.py:217(_last_edited)(200) 0.193 Page.py:350(getPageList)(100) 90.340 Page.py:887(send_page_content)(100) 134.037 Page.py:980(getRevList)(3) 0.002 caching.py:13(__init__)(200) 0.066 editlog.py:72(__init__)(100) 1.034 eventlog.py:13(__init__)(100) 0.024 wikiacl.py:185(may) security.py:52(<lambda>)(64200) 80.319 pysupport.py:37(importName) wikiutil.py:508(importPlugin)(1600) 2.127 wikiutil.py:529(builtinPlugins)(126) 0.004 wikiutil.py:543(extensionPlugins)(126) 0.137 Page.py:188(_text_filename) Page.py:288(isWritable)(100) 0.033 Page.py:297(exists)(18627) 18.065 Page.py:411(get_raw_body)(625) 1.404 Page.py:562(send_page)(100) 144.392 Page.py:887(send_page_content)(100) 134.037 Page.py:1080(getACL)(64200) 72.753 Page.py:24(__init__) AttachFile.py:50(getAttachDir)(100) 1.073 Page.py:1080(getACL)(1) 72.753 RecentChanges.py:43(format_page_edits)(2100) 19.376 __init__.py:61(formatMarkup)(26) 0.345 request.py:645(run)(100) 144.595 security.py:52(<lambda>)(64200) 80.319 wikiutil.py:432(getSysPage)(1300) 0.046 wikiutil.py:462(getHomePage)(6400) 7.638 wikiutil.py:902(send_title)(100) 4.991 default.py:394(wakeUp) base.py:203(wakeUp)(6400) 1.746 wikiutil.py:765(link_tag) Page.py:470(link_to)(8800) 10.108 Page.py:887(send_page_content)(100) 134.037 RecentChanges.py:43(format_page_edits)(3100) 19.376 __init__.py:131(logo)(100) 0.011 __init__.py:842(editbar)(300) 1.464 Page.py:1080(getACL) security.py:52(<lambda>)(64200) 80.319 user.py:270(load_from_id) user.py:144(__init__)(400) 1.387 codecs.py:232(read) codecs.py:378(read)(1224) 1.205 wikiutil.py:462(getHomePage) editlog.py:33(getEditorData)(6400) 9.146 wikiutil.py:902(send_title)(100) 4.991 posixpath.py:144(getmtime) Page.py:1080(getACL)(60000) 72.753 RecentChanges:2(?)(100) 133.702 caching.py:40(mtime)(200) 0.035 caching.py:46(needsUpdate)(500) 0.025 wikiutil.py:259(version2timestamp) Page.py:261(lastEditInfo)(200) 4.743 RecentChanges.py:43(format_page_edits)(2100) 19.376 RecentChanges.py:215(execute)(10100) 41.036 wikidicts.py:133(has_member) wikidicts.py:252(has_member)(24200) 1.377
MissingPage (Nir)
The page you get when there is no such page. Involve a search for like pages.
ab -n 10 -c 1 http://localhost:8000/NoSuchPageHere
I run here only 10 requests because I get segmentation fault at the end of the run with 100 requests.
569649 function calls (532249 primitive calls) in 20.573 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) 44733/22921 5.445 0.000 10.551 0.000 Page.py:78(get_rev) 10740 3.318 0.000 3.478 0.000 wikiacl.py:185(may) 56178 3.223 0.000 3.223 0.000 posixpath.py:171(exists) 40 1.336 0.033 17.276 0.432 Page.py:1130(listPages) 427/56 1.091 0.003 1.208 0.022 sre_parse.py:367(_parse) 2360 1.084 0.000 1.084 0.000 difflib.py:344(find_longest_match) 148366 1.039 0.000 1.039 0.000 posixpath.py:56(join) 23970 0.560 0.000 0.560 0.000 wikiutil.py:154(quoteWikinameFS) 10740 0.512 0.000 0.635 0.000 wikiutil.py:187(unquoteWikiname) 23970/12000 0.512 0.000 7.197 0.001 Page.py:109(getPagePath) 10740 0.213 0.000 9.182 0.001 Page.py:1080(getACL) 10720 0.169 0.000 0.169 0.000 posixpath.py:144(getmtime) 10740 0.159 0.000 12.907 0.001 security.py:52(<lambda>) 4430 0.130 0.000 0.137 0.000 difflib.py:621(quick_ratio) 10740 0.122 0.000 0.122 0.000 wikiutil.py:56(decodeUserInput) 10740 0.115 0.000 0.115 0.000 security.py:45(__getattr__) 8 0.112 0.014 0.149 0.019 sre_compile.py:271(_optimize_unicode) 11979 0.107 0.000 8.421 0.001 Page.py:188(_text_filename) 10947 0.088 0.000 0.088 0.000 Page.py:24(__init__) 3451 0.079 0.000 0.079 0.000 wikiacl.py:272(next)
TitleIndex
Big page with many links.
ab -n 10 -c 1 http://localhost:8000/TitleIndex
I run here only 10 requests because I get segmentation fault at the end of the run with 100 requests.
369573 function calls (345801 primitive calls) in 15.185 CPU seconds Ordered by: internal time, call count List reduced from 451 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 27808/14408 5.224 0.000 9.282 0.001 Page.py:78(get_rev) 95698 1.707 0.000 1.707 0.000 posixpath.py:56(join) 17256/8638 1.392 0.000 6.097 0.001 Page.py:109(getPagePath) 5370 1.270 0.000 1.335 0.000 wikiutil.py:187(unquoteWikiname) 20 1.178 0.059 11.200 0.560 Page.py:1130(listPages) 10 1.010 0.101 1.130 0.113 __init__.py:626(shouldUseRSS) 35842 0.807 0.000 0.807 0.000 posixpath.py:171(exists) 17256 0.486 0.000 0.486 0.000 wikiutil.py:154(quoteWikinameFS) 5390 0.171 0.000 0.255 0.000 wikiacl.py:185(may) 5390 0.122 0.000 5.594 0.001 Page.py:1080(getACL) 5490 0.088 0.000 0.088 0.000 posixpath.py:144(getmtime) 5390 0.088 0.000 5.983 0.001 security.py:52(<lambda>) 1970 0.084 0.000 0.084 0.000 wikiutil.py:75(quoteWikinameURL) 3444 0.079 0.000 0.079 0.000 wikiacl.py:272(next) 7618 0.075 0.000 6.519 0.001 Page.py:188(_text_filename) 7610 0.073 0.000 0.093 0.000 wikidicts.py:252(has_member) 425/56 0.067 0.000 0.153 0.003 sre_parse.py:367(_parse) 5370 0.065 0.000 0.065 0.000 wikiutil.py:56(decodeUserInput) 7498 0.063 0.000 0.063 0.000 Page.py:24(__init__) 136 0.058 0.000 0.074 0.001 pysupport.py:37(importName)
HelpOnConfiguration (Nir)
This is a good test for typical wiki page. Not too long or short, use many tables. Maybe we need simpler page.
ab -n 100 -c 1 http://localhost:8000/HelpOnConfiguration
554305 function calls (521963 primitive calls) in 21.314 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) 30604/11702 5.579 0.000 12.262 0.001 Page.py:78(get_rev) 42005 4.203 0.000 4.203 0.000 posixpath.py:171(exists) 109516 1.885 0.000 1.885 0.000 posixpath.py:56(join) 20600 1.310 0.000 1.310 0.000 request.py:419(encode) 646 1.295 0.002 1.373 0.002 pysupport.py:37(importName) 11000 1.038 0.000 1.038 0.000 request.py:315(getScriptname) 23504/11802 0.577 0.000 10.216 0.001 Page.py:109(getPagePath) 21000 0.459 0.000 0.459 0.000 socket.py:237(flush) 23504 0.367 0.000 0.367 0.000 wikiutil.py:154(quoteWikinameFS) 11400 0.310 0.000 0.310 0.000 wikiutil.py:75(quoteWikinameURL) 8600 0.277 0.000 14.450 0.002 text_html.py:212(pagelink) 9900 0.264 0.000 1.467 0.000 wikiutil.py:765(link_tag) 8923 0.255 0.000 0.398 0.000 warnings.py:24(warn) 9400 0.233 0.000 14.070 0.001 Page.py:470(link_to) 14623 0.187 0.000 0.187 0.000 wikiutil.py:113(escape) 20900 0.155 0.000 0.614 0.000 socket.py:246(write) 20600 0.147 0.000 2.032 0.000 request.py:1467(write) 8923 0.144 0.000 0.144 0.000 warnings.py:59(warn_explicit) 100 0.140 0.001 16.567 0.166 HelpOnConfiguration:2(?) 11102 0.126 0.000 12.304 0.001 Page.py:188(_text_filename)
Title Search (Nir)
This search should be really fast, because the wiki pages rarely changes, and we only searching the list of page names. This operation is also very common, we remember part of a page name, and we search with this part.
ab -n 100 -c 1 'http://localhost:8000/HelpOnInstalling/StandaloneServer?action=fullsearch&context=180&value=Moin+Moin&titlesearch=Titles'
3209947 function calls (3001959 primitive calls) in 138.160 CPU seconds Ordered by: internal time, call count List reduced from 375 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 273012/138590 48.098 0.000 86.425 0.001 Page.py:77(get_rev) 339013 18.409 0.000 18.409 0.000 posixpath.py:171(exists) 903189 12.976 0.000 12.976 0.000 posixpath.py:56(join) 144980 7.153 0.000 7.153 0.000 wikiutil.py:154(quoteWikinameFS) 65000 6.712 0.000 10.417 0.000 wikiutil.py:187(unquoteWikiname) 65300 6.178 0.000 8.862 0.000 wikiacl.py:185(may) 144980/72590 5.336 0.000 54.753 0.001 Page.py:108(getPagePath) 200 5.205 0.026 125.802 0.629 Page.py:1261(listPages) 65400 3.708 0.000 3.708 0.000 wikiutil.py:56(decodeUserInput) 65500 3.148 0.000 3.148 0.000 posixpath.py:144(getmtime) 134274 3.042 0.000 3.042 0.000 Page.py:28(__init__) 65300 2.386 0.000 73.685 0.001 Page.py:1211(getACL) 65300 2.005 0.000 87.150 0.001 security.py:52(<lambda>) 52800 1.692 0.000 1.823 0.000 wikidicts.py:272(has_member) 64200 1.631 0.000 1.763 0.000 search.py:121(sortByCost) 5004 1.253 0.000 1.253 0.000 wikiutil.py:75(quoteWikinameURL) 1932 1.074 0.001 1.202 0.001 wikiacl.py:143(addLine) 330/49 1.055 0.003 1.138 0.023 sre_parse.py:367(_parse) 66243 0.606 0.000 62.554 0.001 Page.py:187(_text_filename) 65300 0.579 0.000 0.579 0.000 security.py:45(__getattr__) Ordered by: internal time, call count List reduced from 375 to 20 due to restriction <20> Function was called by... Page.py:77(get_rev) Page.py:108(getPagePath)(134822) 54.753 Page.py:187(_text_filename)(66243) 62.554 Page.py:320(exists)(5447) 3.146 Page.py:1261(listPages)(66500) 125.802 posixpath.py:171(exists) Page.py:77(get_rev)(273012) 86.425 Page.py:108(getPagePath)(200) 54.753 Page.py:320(exists)(500) 3.146 Page.py:1211(getACL)(65300) 73.685 caching.py:37(exists)(1) 0.000 posixpath.py:56(join) Page.py:77(get_rev)(546024) 86.425 Page.py:108(getPagePath)(289960) 54.753 Page.py:415(getPageList)(100) 125.838 Page.py:1261(listPages)(66500) 125.802 __init__.py:113(loadLanguage)(1) 2.051 caching.py:13(__init__)(101) 0.007 caching.py:34(_filename)(103) 0.001 wikiaction.py:836(getPlugins)(400) 0.064 wikiutil.py:154(quoteWikinameFS) Page.py:108(getPagePath)(144980) 54.753 wikiutil.py:187(unquoteWikiname) Page.py:1261(listPages)(65000) 125.802 wikiacl.py:185(may) security.py:52(<lambda>)(65300) 87.150 Page.py:108(getPagePath) AttachFile.py:50(getAttachDir)(100) 0.053 Page.py:77(get_rev)(71690) 86.425 Page.py:108(getPagePath)(72390) 54.753 Page.py:216(_last_edited)(100) 0.052 Page.py:320(exists)(500) 3.146 Page.py:415(getPageList)(100) 125.838 editlog.py:74(__init__)(100) 0.014 Page.py:1261(listPages) Page.py:415(getPageList)(200) 125.838 wikiutil.py:56(decodeUserInput) request.py:569(_setup_args_from_cgi_form)(400) 0.012 wikiutil.py:187(unquoteWikiname)(65000) 10.417 posixpath.py:144(getmtime) Page.py:260(lastEditInfo)(100) 0.165 Page.py:1211(getACL)(65300) 73.685 logfile.py:160(date)(100) 0.004 Page.py:28(__init__) AttachFile.py:50(getAttachDir)(100) 0.053 Page.py:1197(getParentPage)(200) 0.106 __init__.py:73(formatMarkup)(370) 2.025 request.py:657(run)(100) 138.160 search.py:943(searchPages)(64200) 129.322 security.py:52(<lambda>)(65300) 87.150 text_html.py:212(pagelink)(2404) 2.965 wikiutil.py:432(getSysPage)(1500) 0.836 wikiutil.py:909(send_title)(100) 2.479 Page.py:1211(getACL) security.py:52(<lambda>)(65300) 87.150 security.py:52(<lambda>) Page.py:1261(listPages)(64800) 125.802 __init__.py:488(shouldShowPageinfo)(100) 0.135 __init__.py:750(shouldShowEditbar)(200) 0.169 __init__.py:910(editbar)(100) 0.665 request.py:363(getAvailableActions)(100) 0.191 wikidicts.py:272(has_member) wikiacl.py:185(may)(52800) 8.862 search.py:121(sortByCost) search.py:126(search)(64200) 2.683 wikiutil.py:75(quoteWikinameURL) Page.py:550(link_to)(3104) 3.222 __init__.py:131(logo)(100) 0.062 __init__.py:910(editbar)(100) 0.665 wikiutil.py:909(send_title)(1700) 2.479 wikiacl.py:143(addLine) wikiacl.py:121(setLines)(530) 1.220 wikiacl.py:136(addBefore)(643) 1.089 wikiacl.py:138(addDefault)(116) 0.019 wikiacl.py:140(addAfter)(643) 0.020 sre_parse.py:367(_parse) sre_parse.py:312(_parse_sub)(330) 1.139 Page.py:187(_text_filename) Page.py:260(lastEditInfo)(100) 0.165 Page.py:287(isWritable)(100) 0.055 Page.py:358(size)(100) 0.058 Page.py:476(get_raw_body)(643) 0.440 Page.py:1211(getACL)(65300) 73.685 security.py:45(__getattr__) Page.py:1261(listPages)(64800) 125.802 __init__.py:488(shouldShowPageinfo)(100) 0.135 __init__.py:750(shouldShowEditbar)(200) 0.169 __init__.py:910(editbar)(100) 0.665 request.py:363(getAvailableActions)(100) 0.191
Text Search (Nir)
This is expected to be slow, we search through the text of all pages, no caching.
ab -n 10 -c 1 'http://localhost:8000/HelpOnConfiguration?action=fullsearch&context=180&value=MoinMoin&fullsearch=Text'
867039 function calls (819750 primitive calls) in 29.316 CPU seconds ncalls tottime percall cumtime percall filename:lineno(function) 50928/21398 6.989 0.000 15.962 0.001 Page.py:78(get_rev) 171128 3.194 0.000 3.194 0.000 posixpath.py:56(join) 5230 2.807 0.001 10.237 0.002 search.py:212(search) 31866/15938 2.728 0.000 12.872 0.001 Page.py:109(getPagePath) 59712 2.457 0.000 2.458 0.000 posixpath.py:171(exists) 31866 1.776 0.000 1.776 0.000 wikiutil.py:154(quoteWikinameFS) 2784 1.079 0.000 1.121 0.000 warnings.py:24(warn) 5230 1.057 0.000 1.058 0.000 search.py:262(search) 2990 1.013 0.000 1.021 0.000 wikiacl.py:222(_special_Known) 1 1.009 1.009 1.067 1.067 urllib2.py:71(?) 7144 0.562 0.000 0.562 0.000 codecs.py:232(read) 7144 0.269 0.000 0.385 0.000 codecs.py:531(open) 5380 0.252 0.000 0.314 0.000 wikiutil.py:187(unquoteWikiname) 15940 0.240 0.000 0.436 0.000 search.py:299(weight) 7124 0.211 0.000 7.624 0.001 Page.py:411(get_raw_body) 20 0.175 0.009 10.054 0.503 Page.py:1130(listPages) 5370 0.164 0.000 1.240 0.000 wikiacl.py:185(may) 15908 0.149 0.000 15.467 0.001 Page.py:188(_text_filename) 13704 0.144 0.000 0.144 0.000 wikiutil.py:113(escape) 60670 0.126 0.000 0.126 0.000 search.py:301(<lambda>)