{ "info": { "author": "BlueDynamics Alliance", "author_email": "dev@bluedynamics.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development" ], "description": ".. contents:: Table of Contents\n :depth: 2\n\nPerfmetrics configuration for Zope and Plone\n============================================\n\nzperfmetrics works like and depends on `perfmetrics `_, additional it:\n\n- offers a ZConfig configuration for the statsd,\n- uses the current requests path in the statd dotted path prefix,\n- also provides a patch to measure plone.app.theming for diazo compile and diazo transform if Plone is available,\n\n\nInstallation\n============\n\nFirst get your ``statsd`` configured properly.\nThis is out of scope of this module.\n\nDepend on this module in your packages ``setup.py``.\n\nGiven you use ``zc.builodut`` to set up your Zope2 or Plone,\nadd to your ``[instance]`` section or the section with ``recipe = plone.recipe.zope2instance`` the lines::\n\n [instance01]\n recipe = plone.recipe.zope2instance\n ...\n zope-conf-imports =\n zperfmetrics\n zope-conf-additional =\n \n uri statsd://localhost:8125\n before MyFancyProject\n hostname on\n virtualhost on\n after ${:_buildout_section_name_}\n \n ...\n\nGiven this runs on a host called ``w-plone1``,\nthis will result in a prefix ``MyFancyProject.w-plone1.instance01``.\n\nuri\n Full URI of statd.\n\nbefore\n Prefix path before the hostname.\n\nhostname\n Get hostname and insert into prefix.\n (Boolean: ``on`` or ``off``)\n\nvirtualhost\n Get virtualhost and use in ZPerfmetrics after the static prefix.\n (Boolean: ``on`` or ``off``)\n\nafter\n Prefix path after the hostname.\n\n\nUsage\n=====\n\nYou need to decorate your code or use the ``with`` statement to measure a code block.\n\nUsage::\n\n from zperfmetrics import ZMetric\n from zperfmetrics import zmetric\n from zperfmetrics import zmetricmethod\n\n @zmetric\n def some_function():\n # whole functions timing and call counts will be measured\n pass\n\n @ZMetric(stat='a_custom_prefix')\n def some_other_function():\n # set a custom prefix instead of module path and fucntion name.\n pass\n\n class Foo(object):\n\n @zmetricmethod\n def some_method(self):\n # whole methods timing and call counts will be measured\n pass\n\n @ZMetric(method=True, timing=False):\n def some_counted_method(self):\n # whole methods number of calls will be measured, but no times\n pass\n\n @ZMetric(method=True, count=False):\n def some_timed_method(self):\n # whole methods timing be measured, but no counts\n pass\n\n def some_method_partly_measured(self):\n # do something here you dont want to measure\n with ZMetric(stat='part_of_other_method_time'):\n # do something to measure\n # call counts and timing will be measured\n pass\n # do something here you dont want to measure\n\n @ZMetric(method=True, rate=0.5):\n def some_random_recorded_method(self):\n # randomly record 50% of the calls.\n pass\n\n\nRequest Lifecycle Integration\n=============================\n\nAll ZPerfmetrics with a request passed in are considered to be under the ``request_lifecycle`` section.\n\nAll metrics in here are build like: ``$PREFIX.request_lifecycle.[$VIRTUAL_HOST].$PATH.*``.\n\nZope\n----\n\nThis package provides subscribers to measure the time a request takes,\nincluding some points in time between.\n\nThese subscribers are loaded via zcml and are logging under ``publish.*``:\n\n``publish.traversal``\n time needed from publication start until traversal is finished.\n\n``publish.rendering``\n time needed from traversal end until before commit begin.\n\n This value is a bit fuzzy and should be taken with a grain of salt,\n because there can be other subscribers to this event which take their time.\n Since the order of execution of the subscribers is not defined,\n processing may happen after this measurement\n\n If plone tranformchain is active,\n the rendering time is before transforms are starting.\n\n``publish.finalize``\n time needed from rendering end (or transform end if plone.transformchain is active) until database commit is done.\n\n``publish_all``\n whole time needed from publication start until request is completly processed.\n\nPlone\n-----\n\nInstalling this package in Plone by depending on ``zperfmetrics[plone]`` forces usage of ``plone.transformchain`` version 1.2 or newer.\n\nFirst, ``publish.rendering`` gets less fuzzy because the expensive transforms (also subscribers to publish.beforecommit) are all done.\n\nThen it introduces new measurements related to ``plone.transformchain``:\n\n``publish.transform_all``\n time needed for all transforms in the ``plone.transformchain``.\n This usually includes Diazo.\n\n``publish_transform_single.${ORDER}-${TRANSFORMNAME}``\n time needed for a specific single transform.\n transforms are ordered and named, both are replaced.\n\n\nThis package patches:\n\n``diazo.setup`` metric\n ``plone.app.theming.transform.ThemeTransform.setupTransform`` is patched as a basic (path-less) perfmetrics ``Metric``.\n The setup of the transform happens once on startup and is the time needed to create the Diazo xslt from its rules.xml, index.html and related files.\n\nStatd, Graphite & Grafana in Docker\n===================================\n\nSetting up Statsd, Graphite and Grafana can be complex.\nFor local testing - but also for production environments - firing up some docker containers comes in handy.\n\nA very minimal version of such a `Statd, Graphite & Grafana in Docker setup `_ (`original `_) helps getting things initially up and running.\n`Install Docker `_ and `install docker-compose `_ (just ``pip install docker-compose``),\nthen just clone the repository and in its ``docker`` directory run ``docker-compose up -d``.\n\nLet Zperfmetrics point to ``uri statsd://localhost:8125`` and collect some data.\nOpen Grafana in your browser at ``http://localhost:3000``.\n\nGo first to `Grafana Getting Started `_,\nthe 10 minute video *really helps* to find the hidden part of its UI.\n\nSource Code\n===========\n\nThe sources are in a GIT DVCS with its main branches at `github `_.\n\nWe'd be happy to see many branches, forks and pull-requests to make zperfmetrics even better.\n\nContributors\n============\n\n- Jens W. Klein \n\n- Zal\u00e1n Somogyv\u00e1ry\n\nHistory\n=======\n\n1.0b5 (2016-08-05)\n------------------\n\n- Event better naming in order to be able to group and stack:\n Renamed ``publish.sum`` to ``publish_all`` and ``publish.transform_single`` to ``publish_transform_single``.\n [jensens]\n\n1.0b4 (2016-08-05)\n------------------\n\n- Cleanup names, better grouping in order to make graphing easier.\n [jensens]\n\n1.0b3 (2016-08-05)\n------------------\n\n- Enhancement: Introduce after-prefix a top level ``request_lifecycle`` to be consistent with levels.\n [jensens]\n\n\n1.0b2 (2016-08-04)\n------------------\n\n- Fix: Name of a single transform may contain dots.\n They are now replaced by ``_``.\n [jensens]\n\n- Fix: The root element of a path was not shown on the same level as all other paths.\n Now it is shown as ``__root__``\n [jensens]\n\n- Feature: It was not possible to filter by virtual host in environment with more than one site per Zope.\n A new configuration option ``virtualhost`` was introduced.\n If set to on, the virtualhost name will be inserted before ``PATH``.\n [jensens]\n\n- Support: In order to make a test installation easier,\n an example docker-compose setup was added to the Github repository together with some documentation in the README.rst.\n [jensens]\n\n1.0b1 (2016-08-04)\n------------------\n\n- Added subscribers to ``plone.transformchain`` events.\n New setup extra ``[plone]``.\n Removed one patch for diazo transform.\n Made ``publish.beforecommit`` less fuzzy in Plone.\n [jensens]\n\n1.0a7 (2016-08-03)\n------------------\n\n- Fix: virtual path config in ZMetric class.\n [syzn]\n\n\n1.0a6 (2016-07-28)\n------------------\n\n- Feature: New value publish.commit.\n Delta time used from publish.beforecommit to request end.\n [jensens]\n\n- Fix: publish.sum shows now overall time of request processing.\n [jensens]\n\n- Fix: Update README to reflect last changes.\n [jensens]\n\n- Use more beautiful paths if VirtualHostMonster is used.\n [syzn]\n\n\n1.0a5 (2016-06-28)\n------------------\n\n- Fix: Before/after hooks were not assigned correctly.\n [jensens]\n\n\n1.0a4 (2016-06-10)\n------------------\n\n- Fixes measurements of zope request, also add more detailed metrics.\n [jensens]\n\n\n1.0a3 (2016-06-09)\n------------------\n\n- Measure time a zope request needs.\n [jensens]\n\n\n1.0a2 (2016-03-22)\n------------------\n\n- Refactored: ZConfig best practice\n [jensens]\n\n- Fix: Strip trailing dot from prefix\n [jensens]\n\n\n1.0a1 (2016-03-22)\n------------------\n\n- Fix: README was wrong.\n [jensens]\n\n\n1.0a0 (2016-03-22)\n------------------\n\n- made it work [jensens, 2016-03-17]\n\n\nLicense\n=======\n\nCopyright (c) 2016, BlueDynamics Alliance, Austria, Germany, Switzerland\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this \n list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this \n list of conditions and the following disclaimer in the documentation and/or \n other materials provided with the distribution.\n* Neither the name of the BlueDynamics Alliance nor the names of its \n contributors may be used to endorse or promote products derived from this \n software without specific prior written permission.\n \nTHIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance ``AS IS`` AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/collective/zperfmetrics", "keywords": "plone zope perfmetrics statsd graphite monitor performance", "license": "Simplified BSD", "maintainer": "", "maintainer_email": "", "name": "zperfmetrics", "package_url": "https://pypi.org/project/zperfmetrics/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zperfmetrics/", "project_urls": { "Homepage": "http://github.com/collective/zperfmetrics" }, "release_url": "https://pypi.org/project/zperfmetrics/1.0b5/", "requires_dist": null, "requires_python": "", "summary": "Perfmetrics configuration for Zope/Plone.", "version": "1.0b5" }, "last_serial": 2264035, "releases": { "1.0a0": [ { "comment_text": "", "digests": { "md5": "9f43ff856c1f130561d5537d3f651511", "sha256": "0f750893a67e04657dd6ea1dfef32aa7e67f148621d2b906d16a83ca5a786ed1" }, "downloads": -1, "filename": "zperfmetrics-1.0a0.tar.gz", "has_sig": false, "md5_digest": "9f43ff856c1f130561d5537d3f651511", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5929, "upload_time": "2016-03-22T11:56:31", "url": "https://files.pythonhosted.org/packages/4b/76/461a24ca8e72d0d810794c5dfb2f08244c1ae8c7f41e059b5db3031f7659/zperfmetrics-1.0a0.tar.gz" } ], "1.0a1": [ { "comment_text": "", "digests": { "md5": "579ff957cdba7b715a4b27a379b0ef81", "sha256": "d2d0133a997d6eec620e488d1b8a958bef31ebd91e827672f5743293a95eb411" }, "downloads": -1, "filename": "zperfmetrics-1.0a1.tar.gz", "has_sig": false, "md5_digest": "579ff957cdba7b715a4b27a379b0ef81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5983, "upload_time": "2016-03-22T12:11:46", "url": "https://files.pythonhosted.org/packages/9f/e8/09e686ecc28889a89979250b1ecf22d3812e1e95153c3c893f456abff59c/zperfmetrics-1.0a1.tar.gz" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "9f98f191453ce4bd31b0efd6e17fc610", "sha256": "e56e0ae3681e8e5b356ffe8de99b948ac26cfc13aab9ee72af2e653703a6bd9d" }, "downloads": -1, "filename": "zperfmetrics-1.0a2.tar.gz", "has_sig": false, "md5_digest": "9f98f191453ce4bd31b0efd6e17fc610", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6078, "upload_time": "2016-03-22T16:37:59", "url": "https://files.pythonhosted.org/packages/e3/ce/6422d306d6a8d15f4d0278b42865961ea6bb953f107ff99ae03895c98267/zperfmetrics-1.0a2.tar.gz" } ], "1.0a3": [ { "comment_text": "", "digests": { "md5": "db8f770964e2b91648c69e2cf97c0b70", "sha256": "8204072257f9cf53c8928e1643ba4591f525ba1c792317d9593a260032de0664" }, "downloads": -1, "filename": "zperfmetrics-1.0a3.tar.gz", "has_sig": false, "md5_digest": "db8f770964e2b91648c69e2cf97c0b70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6374, "upload_time": "2016-06-09T19:24:04", "url": "https://files.pythonhosted.org/packages/21/bb/6f1d13f2aaa5cffdffc3bc26f7b0b0c2a91fed258d1f557e7e7eb1e041e9/zperfmetrics-1.0a3.tar.gz" } ], "1.0a4": [ { "comment_text": "", "digests": { "md5": "bab8254b5efdc14e345e0e04d6514c9a", "sha256": "c65ee3db5ce10f924a76aaf94da8f2c982c986962b70b8fadb3c0b2b24a3279b" }, "downloads": -1, "filename": "zperfmetrics-1.0a4.tar.gz", "has_sig": false, "md5_digest": "bab8254b5efdc14e345e0e04d6514c9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7458, "upload_time": "2016-06-10T08:24:58", "url": "https://files.pythonhosted.org/packages/57/42/619f3d06ebf76c5b5678cb5ef6cf36c459ecebec1ec2c32c2a7fa706b042/zperfmetrics-1.0a4.tar.gz" } ], "1.0a5": [ { "comment_text": "", "digests": { "md5": "be1d840eeee2289e7e1b2bc1e02c4929", "sha256": "518f9a9a9a449aa3f776d45da86327407f3b487cb7db064ef0d5517c4b1bd458" }, "downloads": -1, "filename": "zperfmetrics-1.0a5.tar.gz", "has_sig": false, "md5_digest": "be1d840eeee2289e7e1b2bc1e02c4929", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7745, "upload_time": "2016-06-28T13:53:31", "url": "https://files.pythonhosted.org/packages/e8/b3/ab5446ac007af4b0ad254e97ba8065105cf0dc69e2391cb16a74b4f8f221/zperfmetrics-1.0a5.tar.gz" } ], "1.0a6": [ { "comment_text": "", "digests": { "md5": "5c355c0d851ca79dcb98d1cc1ab02666", "sha256": "099cdb31447a2b83dc911eba9e64d452dd9859e71bb16f8a6fc1620bbadcb2b0" }, "downloads": -1, "filename": "zperfmetrics-1.0a6.tar.gz", "has_sig": false, "md5_digest": "5c355c0d851ca79dcb98d1cc1ab02666", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8426, "upload_time": "2016-07-28T11:38:19", "url": "https://files.pythonhosted.org/packages/a7/58/8fab47d670142a0fdff77df30ff5d335b558133360a82b9b1e18ef3380d1/zperfmetrics-1.0a6.tar.gz" } ], "1.0a7": [ { "comment_text": "", "digests": { "md5": "99b29a30314ba883ed45dd2afdcd7579", "sha256": "4c4328fe0ab3597818ded0402f1363c57809eb8cfdd35051bfcc21b51a4742b5" }, "downloads": -1, "filename": "zperfmetrics-1.0a7.tar.gz", "has_sig": false, "md5_digest": "99b29a30314ba883ed45dd2afdcd7579", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8472, "upload_time": "2016-08-03T10:16:31", "url": "https://files.pythonhosted.org/packages/8d/66/1d4e41d025efb0dbb472f617407f34c5f34a1a1c711471348fd4e0fc11b0/zperfmetrics-1.0a7.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "c63d282d1673adb226c09a4063441376", "sha256": "e319c5170b271c2b2b1dc3bf5267ad297454f54a9f4a0978291702d5398860ff" }, "downloads": -1, "filename": "zperfmetrics-1.0b1.tar.gz", "has_sig": false, "md5_digest": "c63d282d1673adb226c09a4063441376", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9652, "upload_time": "2016-08-04T14:07:39", "url": "https://files.pythonhosted.org/packages/87/bd/3b9774efad994e9cd744d4d98018a0295e5849a1775d30ae9ec6d0df996a/zperfmetrics-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "17b5a908a1424e77efb6de48f7dbf0b3", "sha256": "c7f05d5a62bf1426f07dc648b252dcaf85d59d4025cd6ee614e7365b62c3c230" }, "downloads": -1, "filename": "zperfmetrics-1.0b2.tar.gz", "has_sig": false, "md5_digest": "17b5a908a1424e77efb6de48f7dbf0b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12498, "upload_time": "2016-08-04T21:26:21", "url": "https://files.pythonhosted.org/packages/be/59/28fab4c692c9cb826e38271e36f08ab696ec8d498a84170853e9ad366f62/zperfmetrics-1.0b2.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "2cfa920fca4e75d7fa410eb5c094c448", "sha256": "81c310a657b9aab3758cb2cad2fa54e094ba1751785212c76b2cb9a85b50a19c" }, "downloads": -1, "filename": "zperfmetrics-1.0b3.tar.gz", "has_sig": false, "md5_digest": "2cfa920fca4e75d7fa410eb5c094c448", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12679, "upload_time": "2016-08-04T22:48:39", "url": "https://files.pythonhosted.org/packages/5f/93/970ab2b0fc75da7b700b19fcc77f81985e42ecde1f66250245639b5d4ce2/zperfmetrics-1.0b3.tar.gz" } ], "1.0b4": [ { "comment_text": "", "digests": { "md5": "fd97caa01148d043510dbc0b00e124d7", "sha256": "b5e39986764d39382b183d3c5ad3c12baf1ff3b399a0d327b7c23c82a6f32f08" }, "downloads": -1, "filename": "zperfmetrics-1.0b4.tar.gz", "has_sig": false, "md5_digest": "fd97caa01148d043510dbc0b00e124d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13190, "upload_time": "2016-08-04T23:58:58", "url": "https://files.pythonhosted.org/packages/05/f4/52fa7d181c6e5113e17bbd8c1b929dccf6b516c74d48ca3f794c35962464/zperfmetrics-1.0b4.tar.gz" } ], "1.0b5": [ { "comment_text": "", "digests": { "md5": "216e4be35ba97dc854e35d32c18fbf39", "sha256": "bf0b201f5bc39db9de6fad88f256082c2c4e17c54ec38d29e52d79512c75e888" }, "downloads": -1, "filename": "zperfmetrics-1.0b5.tar.gz", "has_sig": false, "md5_digest": "216e4be35ba97dc854e35d32c18fbf39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13303, "upload_time": "2016-08-05T12:11:18", "url": "https://files.pythonhosted.org/packages/c2/f6/1a838c694e90a3608327ac0dd14d6a894e04c26b2d550b6266185d08f712/zperfmetrics-1.0b5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "216e4be35ba97dc854e35d32c18fbf39", "sha256": "bf0b201f5bc39db9de6fad88f256082c2c4e17c54ec38d29e52d79512c75e888" }, "downloads": -1, "filename": "zperfmetrics-1.0b5.tar.gz", "has_sig": false, "md5_digest": "216e4be35ba97dc854e35d32c18fbf39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13303, "upload_time": "2016-08-05T12:11:18", "url": "https://files.pythonhosted.org/packages/c2/f6/1a838c694e90a3608327ac0dd14d6a894e04c26b2d550b6266185d08f712/zperfmetrics-1.0b5.tar.gz" } ] }