{ "info": { "author": "Jeremy Bowman", "author_email": "jbowman@safaribooksonline.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django :: 1.10", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Software Development" ], "description": "yet-another-django-profiler README\n==================================\n\n.. image:: https://img.shields.io/pypi/v/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n\n.. image:: https://travis-ci.org/safarijv/yet-another-django-profiler.svg?branch=master\n :target: https://travis-ci.org/safarijv/yet-another-django-profiler\n\n.. image:: https://coveralls.io/repos/safarijv/yet-another-django-profiler/badge.svg\n :target: https://coveralls.io/r/safarijv/yet-another-django-profiler\n\n.. image:: https://img.shields.io/pypi/pyversions/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/implementation/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: Supported Python implementations\n\n.. image:: https://img.shields.io/pypi/l/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: License\n\n.. image:: https://img.shields.io/pypi/dm/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: Downloads\n\n.. image:: https://img.shields.io/pypi/status/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: Development Status\n\n.. image:: https://img.shields.io/pypi/wheel/yet-another-django-profiler.svg\n :target: https://pypi.python.org/pypi/yet-another-django-profiler/\n :alt: Wheel Status\n\nYet Another Django Profiler attempts to combine the best features of assorted\nother Django profiling utilities that have been created over the years.\n(For more background information, see my\n`blog post `_\non the topic.)\n\nInstallation\n------------\nFirst, get the code via pip install::\n\n pip install yet-another-django-profiler\n\nThen add ``yet_another_django_profiler.middleware.ProfilerMiddleware`` to your\n``MIDDLEWARE`` or ``MIDDLEWARE_CLASSES`` Django setting (typically at the end\nof the list, if you want to include profiling data on the other middleware\nthat's in use). If you want to generate call graphs with the middleware, you\nalso need to install `Graphviz `_. If\nyou want to use the \"profile\" management command, you'll also need to add\n``yet_another_django_profiler`` to the ``INSTALLED_APPS`` setting.\n\nMiddleware Usage\n----------------\nThe simplest usage is to just add a ``profile`` parameter to the URL of a\nDjango view. This uses Graphviz to generate a PDF representation of the call\ngraph for the code executed to perform the view, and returns that as the\nresponse to the request instead of the rendered view itself. So calling a\nURL like ``http://localhost:8000/admin/?profile`` shows a PDF like\n`this `_\nin the browser.\n\nAlternatively, you can display a table of called functions ordered by the\ndesired statistic by using a URL such as ``http://localhost:8000/?profile=time``.\nThe available sorting options are:\n\n* ``calls`` (call count)\n\n* ``cumulative`` (cumulative time)\n\n* ``file`` (file name, same as ``module``)\n\n* ``module`` (file name, same as ``file``)\n\n* ``pcalls`` (primitive call count)\n\n* ``line`` (line number)\n\n* ``name`` (function name)\n\n* ``nfl`` ( function name/file/line)\n\n* ``stdname`` (standard name)\n\n* ``time`` (internal time)\n\nBy default, only the top 20% of function calls are included in the table. To\nchange that, add a ``fraction`` parameter with the desired display ratio\n(hence the default value is ``fraction=.2``). Alternatively, you can\ninstead specify a maximum number of function calls to display using the\n``max_calls`` parameter. And if you specify a regular expression with the\n``pattern`` parameter, only calls of functions whose names match the\nspecified pattern will be displayed. (I'd recommend sticking to basic\nsub-strings unless you really enjoy figuring out how to URL-escape special\ncharacters.) By default when using yappi it will use `cpu` clock type if\nwhat you want is `wall` time you can use ``clock=wall``.\n\nViews which return a StreamingHttpResponse can be profiled, but the profiling\ndata stops at the return of the response from the view; the iteration over the\ncontent isn't profiled.\n\nIf you forget the available sorting options and such, you can use\n``profile=help`` as a request parameter to display the usage instructions in\nthe browser.\n\nManagement Command Usage\n------------------------\nyet-another-django-profiler includes a ``profile`` management command which can\nbe used to profile other Django management commands::\n\n\n usage: manage.py profile [-h] [--version] [-v {0,1,2,3}]\n [--settings SETTINGS] [--pythonpath PYTHONPATH]\n [--traceback] [--no-color] [-o PATH] [-s SORT]\n [-f FRACTION] [-m MAX_CALLS] [-p PATTERN]\n [-b BACKEND] [-c CLOCK]\n other_command ...\n\n Profile another Django management command\n\n positional arguments:\n other_command The management command to be profiled\n command_arguments Arguments of the management command being profiled\n\n optional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -v {0,1,2,3}, --verbosity {0,1,2,3}\n Verbosity level; 0=minimal output, 1=normal output,\n 2=verbose output, 3=very verbose output\n --settings SETTINGS The Python path to a settings module, e.g.\n \"myproject.settings.main\". If this isn't provided, the\n DJANGO_SETTINGS_MODULE environment variable will be\n used.\n --pythonpath PYTHONPATH\n A directory to add to the Python path, e.g.\n \"/home/djangoprojects/myproject\".\n --traceback Raise on CommandError exceptions\n --no-color Don't colorize the command output.\n -o PATH, --output PATH\n Path to a file in which to store the profiling output\n (required if generating a call graph PDF, other\n results are output to the console by default)\n -s SORT, --sort SORT Statistic by which to sort the profiling data (default\n is to generate a call graph PDF instead)\n -f FRACTION, --fraction FRACTION\n The fraction of total function calls to display (the\n default of .2 is omitted if max-calls or pattern are\n specified)\n -m MAX_CALLS, --max-calls MAX_CALLS\n The maximum number of function calls to display\n -p PATTERN, --pattern PATTERN\n Regular expression filter for function display names\n -b BACKEND, --backend BACKEND\n Profiler backend to use (cProfile or yappi)\n -c CLOCK, --clock CLOCK\n Yappi clock type to use (cpu or wall)\n\nSample usage:\n\n* ``django-admin.py profile -s time test --failfast my_app/my_module.py:TestClass.test_function``\n* ``django-admin.py profile -o ~/Downloads/call_graph.pdf collectstatic``\n\nSettings\n--------\nThe middleware is designed to be available whenever the ``DEBUG`` setting is\nTrue, and removes itself from the middleware chain otherwise (so it can safely\nbe left in the dependencies for production deployments without performance or\nsecurity problems). If for some reason you want to change this behavior, you\ncan set the ``YADP_ENABLED`` boolean setting directly to determine whether the\nmiddleware is active or not.\n\nIf you have pages where the default profiling parameter names conflict with\nexisting parameters in the application, you can choose different ones via the\nfollowing settings:\n\n* ``YADP_PROFILE_PARAMETER`` (default is \"profile\")\n\n* ``YADP_FRACTION_PARAMETER`` (default is \"fraction\")\n\n* ``YADP_MAX_CALLS_PARAMETER`` (default is \"max_calls\")\n\n* ``YADP_PATTERN_PARAMETER`` (default is \"pattern\")\n\n* ``YADP_CLOCK_PARAMETER`` (default is \"cpu\")\n\nYou can use Yappi (`Yet Another Python Profiler `_)\nas a profiler backend instead of cProfile. To do that just specify\n``YADP_PROFILER_BACKEND = 'yappi'`` in the settings. Note that Yappi does not\ncurrently work on PyPy or CPython 3.2.\n\nAn effort is made to convert the absolute Python file paths provided by the\nprofiler to full-qualified module names (which are typically shorter and\neasier to understand at a glance). The default rules should work in most cases\nbut can be customized via the following settings:\n\n* ``YADP_MODULE_PARENT_DIR_PATTERNS`` is a list of regular expression patterns.\n Everything in a module path up to and including a match of one of these\n patterns is removed from statistic tables and call graphs. The default list\n is ``[r'\\.egg[/\\\\]', r'site-packages[/\\\\]', r'python\\d+\\.\\d+[/\\\\]']``. The\n absolute path of the current working directory is also pruned.\n\n* If the previous setting doesn't allow sufficient customization for your\n needs, the ``YADP_PATH_TO_MODULE_FUNCTION`` setting can be used to completely\n replace the function used for this task. It should be the fully qualified\n name of your custom function, which takes an absolute file path as input and\n returns what you want to appear in the profiling output to represent that\n path.\n\nIn order to get simple and meaningful profiling data, a\n`few other changes `_\nto your settings may be in order.\n\nRunning Tests\n-------------\nTo run tests in all currently supported combinations of Python and Django, run\n``tox``. If you're running tox from a Python 2 environment, you can instead\nrun ``detox`` to execute all the test environments in parallel. See the\n`tox documentation `_ for instructions\non running a single test case or environment.\n\nInternationalization\n--------------------\nTranslations of text that can appear in the profiling results pages are managed\non `Transifex `_.\nFeel free to request to be added as translator for a not-yet-supported language.\nDjango recommends not translating management command text for\n`assorted technical reasons `_,\nso those phrases currently aren't included.\n\nFor development tasks involving the translations (uploading message changes to\nTransifex or fetching the latest translations from it), use\n`transifex-client `_. By default, pip\ninstalls a rather old stable version so you may want to specify a newer one::\n\n pip install transifex-client==0.11b3\n\nWhen running the makemessages or compilemessages management commands, do so\nfrom the ``yet_another_django_profiler`` directory.\n\nLicense\n-------\nDue to gprof2dot being licensed under the LGPL v3, that's the license that\napplies to this package as a whole. However, the rest of the source files are\nindividually licensed under a more permissive 3-clause BSD license (so it is\npossible to assemble a BSD-licensed package that omits only the call graph\ngeneration feature).", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/safarijv/yet-another-django-profiler", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "yet-another-django-profiler", "package_url": "https://pypi.org/project/yet-another-django-profiler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yet-another-django-profiler/", "project_urls": { "Homepage": "http://github.com/safarijv/yet-another-django-profiler" }, "release_url": "https://pypi.org/project/yet-another-django-profiler/1.1.0/", "requires_dist": [ "Django", "mock" ], "requires_python": "", "summary": "Django middleware for performance profiling directly from the browser", "version": "1.1.0" }, "last_serial": 2566319, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c8a367dcae7018a552bba2637cbf5822", "sha256": "1cbbbd76a72aafaeff42b18525c83a9374b8e82a079345c2280ddafdc742c181" }, "downloads": -1, "filename": "yet-another-django-profiler-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c8a367dcae7018a552bba2637cbf5822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23606, "upload_time": "2014-02-27T20:51:01", "url": "https://files.pythonhosted.org/packages/59/fa/2481b36e57d0c3609a53b8496f67545857474df3bc60a92d4b76f08f2279/yet-another-django-profiler-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "756267ce6b4ca6a4124c905c29769cd7", "sha256": "5de1c1b4f0b4252f89ff18d1ebbf6777cc3565d7d3fb8f759181d75a02a5e942" }, "downloads": -1, "filename": "yet-another-django-profiler-0.2.0.tar.gz", "has_sig": false, "md5_digest": "756267ce6b4ca6a4124c905c29769cd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24253, "upload_time": "2015-02-17T21:02:54", "url": "https://files.pythonhosted.org/packages/ef/5a/cfcbdc003db76fec041a2252c4cfdcb3bb90bdbfb1a955c219888cc0a62b/yet-another-django-profiler-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "693e2bad6d52b509faf8342385bf5119", "sha256": "0c4c32fb4c299b77d9fe9beb043466d25524e471390dff8b58268e306edc7dc7" }, "downloads": -1, "filename": "yet-another-django-profiler-0.3.0.tar.gz", "has_sig": false, "md5_digest": "693e2bad6d52b509faf8342385bf5119", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29598, "upload_time": "2015-02-24T02:05:36", "url": "https://files.pythonhosted.org/packages/89/82/81e3c9bcbf2869958adf6c1ff7073d2df3bbfeb3aa7b2daacfd262ba940b/yet-another-django-profiler-0.3.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "c4caff6cec835ea3c4799b6d19a81ad3", "sha256": "6a5f387c8a52a3abffef84a120cba06ca8eee3e738b4402b277d8618a7c1a13d" }, "downloads": -1, "filename": "yet_another_django_profiler-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c4caff6cec835ea3c4799b6d19a81ad3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 47734, "upload_time": "2015-07-17T21:34:01", "url": "https://files.pythonhosted.org/packages/d3/59/a5dd27bcefab8be6978f1e645b0d92d69ef0c4ccefac6be20299656c5e48/yet_another_django_profiler-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d82adcf4ae6658a2ddedaef39ff2ec12", "sha256": "aaa9128967eb946a6defa25148ef512420a7909b25e4eda27f91e9b2b0a7b4bd" }, "downloads": -1, "filename": "yet-another-django-profiler-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d82adcf4ae6658a2ddedaef39ff2ec12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38347, "upload_time": "2015-07-17T21:33:58", "url": "https://files.pythonhosted.org/packages/00/fe/7475dc6714369d41ae4ace412771139f6e87744fc3711bac67d37be8ecd5/yet-another-django-profiler-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a8f5026e4694db75f8f92eb605f3e7ca", "sha256": "121056c2ed74dd9d29cdd11d7915de2671a7cc274ab02cbefdbd771aa1c6ceb5" }, "downloads": -1, "filename": "yet_another_django_profiler-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a8f5026e4694db75f8f92eb605f3e7ca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 48282, "upload_time": "2015-10-26T15:18:01", "url": "https://files.pythonhosted.org/packages/d3/e3/c51249e002f1374937f1f65a214b1c874ad7db80772a2e81e35c75479b2c/yet_another_django_profiler-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "450cf752a50c79888067a2d7d44212c8", "sha256": "68afd1419268ce6b9b974c9f9113551e6b850d217333263a86ff0bccb0b7e740" }, "downloads": -1, "filename": "yet-another-django-profiler-1.0.1.tar.gz", "has_sig": false, "md5_digest": "450cf752a50c79888067a2d7d44212c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39042, "upload_time": "2015-10-26T15:18:27", "url": "https://files.pythonhosted.org/packages/f9/71/b3af71587e9de4e4745d65ecbe6f117d61f9d05b06976d1a0aa1e59a7423/yet-another-django-profiler-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c6e66404a381e76af08753e4b7cc3d69", "sha256": "f67c971ec0313d87796c774ca444642f6097a7b66ce74fc10f20544b09274f70" }, "downloads": -1, "filename": "yet_another_django_profiler-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6e66404a381e76af08753e4b7cc3d69", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 48450, "upload_time": "2015-12-08T16:30:07", "url": "https://files.pythonhosted.org/packages/54/fc/d9e5eabcac64f42305dd60f41514c4496fce0fe02ba648055d9b303da1c1/yet_another_django_profiler-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5a81f1ce7935478304b05e8b357da73", "sha256": "3bc88c652ac5bb2ca8b516dc627cbb2302ad9c2055fafd8a7581ca7194fafeee" }, "downloads": -1, "filename": "yet-another-django-profiler-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f5a81f1ce7935478304b05e8b357da73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39193, "upload_time": "2015-12-08T16:30:19", "url": "https://files.pythonhosted.org/packages/ec/e3/fe99d71daa4a7938b767e70e8c091ad3d140d6ed4c1a95c7384d2a5a7aac/yet-another-django-profiler-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "89f9d94a1b363e86dee6b7a28f5efe46", "sha256": "700b17af10a209d20bb8128381a338c598ba2e1d5cf89eeceb8a67bc74d7ffcc" }, "downloads": -1, "filename": "yet_another_django_profiler-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89f9d94a1b363e86dee6b7a28f5efe46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50643, "upload_time": "2016-02-08T20:12:17", "url": "https://files.pythonhosted.org/packages/77/72/a97b603f9093fdb0d599cf55edf9a61a0f5a37132e682a1efc038e4c7ef8/yet_another_django_profiler-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b478d9810198755ca3d0e35f160457e1", "sha256": "738b5a028345c062043b0f3a796807644f823d28ba161891cdf7892c7febe67e" }, "downloads": -1, "filename": "yet-another-django-profiler-1.0.3.tar.gz", "has_sig": false, "md5_digest": "b478d9810198755ca3d0e35f160457e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39561, "upload_time": "2016-02-08T20:12:39", "url": "https://files.pythonhosted.org/packages/5f/dd/0d239d6f9a9e0fdb6e39c0e3a046e0d1a8203c01b24185afc78654cc130b/yet-another-django-profiler-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "3aae6df802f3dc3e1504e42e6b1755cc", "sha256": "d101107d2a00ccb5422e4e40c0521b91a834372bf1145a7bc00cfe667acfc880" }, "downloads": -1, "filename": "yet_another_django_profiler-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3aae6df802f3dc3e1504e42e6b1755cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 44312, "upload_time": "2017-01-11T03:41:02", "url": "https://files.pythonhosted.org/packages/1e/7e/88d2114394e381d687782dacc384d9f92b31f44efc40786522401a262a96/yet_another_django_profiler-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c5235623f728bf4d481603a9a048bfe", "sha256": "1bc090db28960c9bcdf8b6c3501b015f89a2998f5de9d7534463fc87f52fb76f" }, "downloads": -1, "filename": "yet-another-django-profiler-1.1.0.tar.gz", "has_sig": false, "md5_digest": "4c5235623f728bf4d481603a9a048bfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39981, "upload_time": "2017-01-11T03:41:04", "url": "https://files.pythonhosted.org/packages/7f/3b/b84d9d9237aedf9dffc73981001746d8333a2b9b4a4175971b85dda3dff7/yet-another-django-profiler-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3aae6df802f3dc3e1504e42e6b1755cc", "sha256": "d101107d2a00ccb5422e4e40c0521b91a834372bf1145a7bc00cfe667acfc880" }, "downloads": -1, "filename": "yet_another_django_profiler-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3aae6df802f3dc3e1504e42e6b1755cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 44312, "upload_time": "2017-01-11T03:41:02", "url": "https://files.pythonhosted.org/packages/1e/7e/88d2114394e381d687782dacc384d9f92b31f44efc40786522401a262a96/yet_another_django_profiler-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c5235623f728bf4d481603a9a048bfe", "sha256": "1bc090db28960c9bcdf8b6c3501b015f89a2998f5de9d7534463fc87f52fb76f" }, "downloads": -1, "filename": "yet-another-django-profiler-1.1.0.tar.gz", "has_sig": false, "md5_digest": "4c5235623f728bf4d481603a9a048bfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39981, "upload_time": "2017-01-11T03:41:04", "url": "https://files.pythonhosted.org/packages/7f/3b/b84d9d9237aedf9dffc73981001746d8333a2b9b4a4175971b85dda3dff7/yet-another-django-profiler-1.1.0.tar.gz" } ] }