{ "info": { "author": "Alex Clark", "author_email": "aclark@aclark.net", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Framework :: Plone", "Framework :: Zope2", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Logging" ], "description": "Introduction\n============\n\nThis is `Enfold Systems'`_ low level ZODB stats tool [1]_.\n\nInstallation\n============\n\nInside Plone\n-------------\n\nTo install in Plone, add ``collective.stats`` to your ``plone.recipe.zope2instance`` section's eggs parameter e.g.::\n\n [instance]\n recipe = plone.recipe.zope2instance\n eggs =\n Plone\n \u2026\n collective.stats\n\nPlone 3.3 usage requires appending [oldzope] to ``collective.stats``::\n\n [instance]\n recipe = plone.recipe.zope2instance\n eggs =\n Plone\n \u2026\n collective.stats [oldzope]\n\nPlone 3.3 on Windows requires a Python 2.4 compilation of the ``psutil`` package which can be found at http://dist.enfoldsystems.com/simple\n\nRun buildout and run Plone in the foreground, and you will see output like this::\n\n 2011-09-22 22:25:30 INFO Zope Ready to handle requests\n 2011-09-22 22:25:50 INFO collective.stats | 0.0021 0.0014 0.0018 0.0004 0.0000 0000 0000 0000 | GET:/favicon.ico | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 116708 - 116744\n 2011-09-22 22:25:55 INFO collective.stats | 0.1783 0.0021 0.1779 0.0004 0.0000 0000 0000 0000 | GET:/manage_main | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 116756 - 116948\n 2011-09-22 22:25:55 INFO collective.stats | 0.0020 0.0013 0.0017 0.0004 0.0000 0000 0000 0000 | GET:/misc_/OFSP/dtmlmethod.gif | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 117076 - 117076\n 2011-09-22 22:25:55 INFO collective.stats | 0.0018 0.0012 0.0016 0.0004 0.0000 0000 0000 0000 | GET:/misc_/TemporaryFolder/tempfolder.gif | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 117076 - 117076\n 2011-09-22 22:25:55 INFO collective.stats | 0.0021 0.0013 0.0018 0.0004 0.0000 0000 0000 0000 | GET:/misc_/SiteAccess/VirtualHostMonster.gif | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 117076 - 117076\n 2011-09-22 22:25:58 INFO collective.stats | 0.3960 0.0015 0.3957 0.0004 0.0000 0000 0000 0000 | GET:/@@plone-addsite | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 117076 - 126352\n 2011-09-22 22:25:58 INFO collective.stats | 0.0020 0.0014 0.0017 0.0004 0.0000 0000 0000 0000 | GET:/++resource++plone-admin-ui.css | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 126352 - 126356\n 2011-09-22 22:25:58 INFO collective.stats | 0.0014 0.0009 0.0012 0.0004 0.0000 0000 0000 0000 | GET:/++resource++plone-logo.png | t: 0.0000, t_c: 0.0000, t_nc: 0.0000 | RSS: 126356 - 126360\n\nIf you want to use this product in a production environment, and you don't want your logs to fill up, you can remove logging by providing an environment variable ``COLLECTIVE_STATS_DISABLE_LOG``. The only value that will cause ``collective.stats`` not to log, is the number 1::\n\n environment-vars =\n COLLECTIVE_STATS_DISABLE_LOG 1\n\nYou still get the ``X-Stats`` response header.\n \nOutside Plone\n-------------\n\nTo use it outside of Plone, after configuring ``collective.stats`` to be used inside Plone (as described above) configure a ``zc.recipe.egg`` section in your buildout like so::\n\n [zopepy]\n recipe = zc.recipe.egg\n eggs = ${instance:eggs}\n interpreter = zopepy\n scripts = collective-stats\n\nRun buildout, and this will create a script called ``collective-stats`` you can use to parse Plone logs and produce a ``.csv`` file::\n\n $ bin/collective-stats var/log/instance.log\n \u2026\n 1.3170 0.0196 1.3139 0.0004 0.0000 0000 0000 0003 | GET:/Plone\n 0.0283 0.0274 0.0278 0.0004 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/member.css\n 0.0153 0.0147 0.0150 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/forms.css\n 0.0176 0.0167 0.0171 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/ploneKss.css\n 0.0704 0.0694 0.0699 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/++resource++plone.app.discussion.stylesheets/discussion.css\n 0.0096 0.0090 0.0093 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/print.css\n 0.0067 0.0061 0.0064 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/mobile.css\n 0.0920 0.0709 0.0915 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/++resource++tinymce.stylesheets/tinymce.css\n 0.0319 0.0313 0.0316 0.0003 0.0034 0004 0000 0000 | GET:/Plone/portal_css/Sunburst Theme/ploneCustom.css\n 0.0078 0.0069 0.0075 0.0003 0.0000 0000 0000 0000 | GET:/Plone/portal_kss/Sunburst Theme/plone.kss\n\nCheck the current directory and you should see a ``stats.csv`` file::\n\n $ ls -1\n \u2026\n lib/\n parts/\n setup.py\n src/\n stats.csv\n var/\n\nTake a peek at the top of that file to see the column headers::\n\n $ head stats.csv \n url,time,t traverse,t commit,t transchain,setstate,total,total cached,modified,rss before,rss after\n GET:/favicon.ico,0.0021,0.0014,0.0018,0.0000,0000,0000,0000,116708,116744\n GET:/manage_main,0.1783,0.0021,0.1779,0.0000,0000,0000,0000,116756,116948\n GET:/manage_page_style.css,0.0110,0.0014,0.0108,0.0000,0000,0000,0000,116948,117012\n GET:/p_/ltab,0.0023,0.0008,0.0021,0.0000,0000,0000,0000,117020,117032\n GET:/p_/sp,0.0100,0.0054,0.0099,0.0039,0018,0004,0000,116992,117032\n GET:/p_/rtab,0.0020,0.0012,0.0018,0.0000,0000,0000,0000,117032,117032\n GET:/misc_/OFSP/Folder_icon.gif,0.0018,0.0012,0.0016,0.0000,0000,0000,0000,117032,117032\n GET:/p_/ControlPanel_icon,0.0017,0.0009,0.0015,0.0000,0000,0000,0000,117036,117036\n GET:/misc_/OFSP/UserFolder_icon.gif,0.0017,0.0012,0.0015,0.0000,0000,0000,0000,117036,117036\n\n\nDocumentation\n=============\n\nColumn header details:\n\n+--------------+---------------------------------------------------------------+\n|Header |Detail |\n+--------------+---------------------------------------------------------------+\n|time |Total time inside publisher |\n+--------------+---------------------------------------------------------------+\n|t traverse |This is time when zope publisher gets publishable object |\n+--------------+---------------------------------------------------------------+\n|t commit |Time on transaction.commit() |\n+--------------+---------------------------------------------------------------+\n|t transchain |Time in plone.transformchain.applyTransform |\n+--------------+---------------------------------------------------------------+\n|setstate |Total time inside Connection.setstate |\n+--------------+---------------------------------------------------------------+\n|total |Total zodb object loads |\n+--------------+---------------------------------------------------------------+\n|total cached |Total loads from cache |\n+--------------+---------------------------------------------------------------+\n|modified |Total modified objects |\n+--------------+---------------------------------------------------------------+\n|rss before |RAM usage before request |\n+--------------+---------------------------------------------------------------+\n|rss after |RAM usage after request |\n+--------------+---------------------------------------------------------------+\n\nAn Example\n==========\n\nIf you enable collective.stats to emit stats in response headers you will see a response line such as::\n\n X-Stats:4.5556 0.0232 1.2539 0.6334 9266 1244 0000\n\nDeciphering::\n\n 4.555 - (time) is total time in Zope Publisher\n\n 0.023 - (t traverse) is after traverse time (callable object inside Publisher)\n time from BEGINNING of request to after TRAVERSE time.\n\n 1.253 - (t commit) is before commit() (we have a complete RESPONSE object)\n time from BEGINGING of request to before COMMIT\n\n 0.6334 - (setstate) total time in __setstate__ (time of ZODB spent unghostifying # of LOAD objects)\n\n 9266 - (total) total number of LOADS\n\n 1244 - (total cached) total number of HOT LOADS (cache hits in ZODB)\n\n 0000 - (modified) total number of MODIFIED objects.\n\nSummary\n-------\n\nt_time - t_commit = total time to commit() (time executed in IPubBeforeCommit)\nIf you are using plone.app.caching or plone.app.theming both of which use\ncommit events; so depending how collective.stats gets registered - its possible\nthose are not being captured.\n\nIn this example 3.3 seconds is \"lost\" in commit. In this particular case\nit was due to unoptimized plone.app.theming / diazo rules file.\n\n\nEnjoy!\n\n.. _`Enfold Systems'`: http://enfoldsystems.com\n\n\n.. [1] ``collective.stats`` has been donated to the Plone collective by Enfold Systems under a BSD-like license (ZPL 2.1).\n\nChangelog\n=========\n\n1.0.2 (2015-12-01)\n------------------\n\n- Provide a way to still have the functionality, without logging\n [frapell] \n\n\n1.0.1 (2015-06-23)\n------------------\n\n- Fixes ``AttributeError`` with ``thread._local``, adapt to new ``psutil`` API.\n Ref: http://stackoverflow.com/questions/20640679\n [thet]\n\n\n1.0.0 (2012-03-29)\n------------------\n\n- Add stats info for plone.transformchain applyTransform\n [fafhrd91]\n\n- Add stats info to failure requests.\n [fafhrd91]\n\n0.9.1 (2011-12-01)\n------------------\n\n- Add output header detail to README\n [aclark]\n\n- Fix typo\n [jean]\n\n0.9.0 (2011-09-22)\n------------------\n\n- Fix docs\n [aclark]\n\n0.8 (2011-09-22)\n----------------\n\n- Fix docs\n [aclark]\n\n0.7 (2011-09-22)\n----------------\n\n- Initial import from enfold.stats 0.7 tarball\n [aclark]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/collective/collective.stats", "keywords": null, "license": "ZPL", "maintainer": null, "maintainer_email": null, "name": "collective.stats", "package_url": "https://pypi.org/project/collective.stats/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.stats/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/collective/collective.stats" }, "release_url": "https://pypi.org/project/collective.stats/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Zope low level stats per request.", "version": "1.0.2" }, "last_serial": 1842271, "releases": { "0.7": [ { "comment_text": "", "digests": { "md5": "c8c0aacaefa44e1ea8598e8880c95f05", "sha256": "042e29a4526f7c063fb7c0262738bf0acae34af2d98024c74448a483785b5bad" }, "downloads": -1, "filename": "collective.stats-0.7.zip", "has_sig": false, "md5_digest": "c8c0aacaefa44e1ea8598e8880c95f05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22882, "upload_time": "2011-09-23T05:12:22", "url": "https://files.pythonhosted.org/packages/b3/e2/67825206c6cd405bf76a3c875baa5a8ff686a62f174d865319232da6218a/collective.stats-0.7.zip" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "119d2fb344f02da0716d63f9ecf1b818", "sha256": "6d52bf8a9f2ab6f9963714a52544735dde7d14816840f3e65a240deed64388f3" }, "downloads": -1, "filename": "collective.stats-0.8.zip", "has_sig": false, "md5_digest": "119d2fb344f02da0716d63f9ecf1b818", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22922, "upload_time": "2011-09-23T05:19:39", "url": "https://files.pythonhosted.org/packages/c9/c2/6eec149207e86847743acb944af4e48e4a0d91370f562c879cc0655ce547/collective.stats-0.8.zip" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "9e284a56b0fda24eba0155676a4b486b", "sha256": "20e28730b6f9dfb5f3a697f9b675402253e8d983118709d92e64486926cea3de" }, "downloads": -1, "filename": "collective.stats-0.9.0.zip", "has_sig": false, "md5_digest": "9e284a56b0fda24eba0155676a4b486b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23058, "upload_time": "2011-09-23T05:40:31", "url": "https://files.pythonhosted.org/packages/e8/58/0896822200d7ff2373479aa8938909868da1f6daae942a7ae2aad3690b88/collective.stats-0.9.0.zip" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "7a5f88ea60100213d3441cabed0e1f98", "sha256": "1457d2e0f5a5cdf4f94522547d1dbf4d411872c20f317f7c46857a0ba776d67d" }, "downloads": -1, "filename": "collective.stats-0.9.1.zip", "has_sig": false, "md5_digest": "7a5f88ea60100213d3441cabed0e1f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24047, "upload_time": "2011-12-09T21:13:13", "url": "https://files.pythonhosted.org/packages/8f/98/97b7fad6c8edea04e5c46dfb52b17df1b89430f37f1c26218eb0075e82c3/collective.stats-0.9.1.zip" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "51445979307d8063d6842e4e661f7952", "sha256": "6299bc8578d98e84b1e50841e28bbc8affee880df9b23411ca77a01bed7a54f0" }, "downloads": -1, "filename": "collective.stats-1.0.0.tar.gz", "has_sig": false, "md5_digest": "51445979307d8063d6842e4e661f7952", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13934, "upload_time": "2012-03-29T20:47:59", "url": "https://files.pythonhosted.org/packages/e3/22/d44ae68438fbf981b065054ebe1f1144a6d2cf2a99de5d1a78c7ca1a6ef0/collective.stats-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e8849b2a979cf8676189b87a9c2e4d9d", "sha256": "8d3f8bf6e91c0a7725a6a80fedbce62cf59ceb019e7080ef1bc57607620102dc" }, "downloads": -1, "filename": "collective.stats-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e8849b2a979cf8676189b87a9c2e4d9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14756, "upload_time": "2015-06-23T15:24:02", "url": "https://files.pythonhosted.org/packages/f0/4a/4c8041d4a5c6fafe0cb96a084b4b7671fc47abb79455e15b64c6efeda4d9/collective.stats-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "2ccf2816370b96b18cfeee1826475212", "sha256": "e3e528b4f679645f8a4594de006fffe34889aaa316cffd5e75960f56c330f934" }, "downloads": -1, "filename": "collective.stats-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2ccf2816370b96b18cfeee1826475212", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15214, "upload_time": "2015-12-01T21:28:32", "url": "https://files.pythonhosted.org/packages/59/b3/109b707d80112c46520c50a61e631e84f3cab84b98375b78bb9dab8768e5/collective.stats-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2ccf2816370b96b18cfeee1826475212", "sha256": "e3e528b4f679645f8a4594de006fffe34889aaa316cffd5e75960f56c330f934" }, "downloads": -1, "filename": "collective.stats-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2ccf2816370b96b18cfeee1826475212", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15214, "upload_time": "2015-12-01T21:28:32", "url": "https://files.pythonhosted.org/packages/59/b3/109b707d80112c46520c50a61e631e84f3cab84b98375b78bb9dab8768e5/collective.stats-1.0.2.tar.gz" } ] }