{ "info": { "author": "Vladim\u00edr Gorej", "author_email": "gorej@codescale.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Bug Tracking", "Topic :: Software Development :: Debuggers", "Topic :: Utilities" ], "description": "django-profiler\n===============\n\ndjango-profiler is util for profiling python code mainly in django projects\nbut can be used also on ordinary python code. It counts sql queries a measures\ntime of code execution. It logs its output via standard\npython logging library and uses logger `profiling`. If your profiler name\ndoesn't contain any empty spaces e.g. Profiler('Profiler1') django-profiler will\nlog all the output to the `profiling.Profiler` logger.\n\n\nRequirements\n------------\n\n- python 2.7+\n\n\nInstallation\n------------\n\nInstall via *pip* or copy this module into your project or into your PYTHON_PATH.\n\n\nConfiguration\n-------------\n\n**django settings.py constants**\n\n::\n\n PROFILING_LOGGER_NAME\n PROFILING_SQL_QUERIES\n\nIt is possible to change default django-profiler logger name by defining\nPROFILING_LOGGER_NAME = 'logger_name' in your django *settings.py*.\n\nTo log also sql queries into profiler logger set PROFILING_SQL_QUERIES to True\nin your django *settings.py* module.\n\n\nExamples\n--------\n\n**Example 1**\n\nUsing context manager approach. Output will be logged to *profiling* logger.\n\n::\n\n from profiling import Profiler\n with Profiler('Complex Computation'):\n # code with some complex computations\n\n**Example 2**\n\nUsing context manager approach. Output will be logged to *profiling.Computation* logger.\n\n::\n\n from profiling import Profiler\n with Profiler('Computation'):\n # code with some complex computations\n\n**Example 3**\n\nUsing standard approach. Output will be logged to *profiling* logger.\n\n::\n\n from profiling import Profiler\n profiler = Profiler('Complex Computation')\n profiler.start()\n # code with some complex computations\n profiler.stop()\n\n**Example 4**\n\nUsing standard approach and starting directly in constructor. Output will be logged to *profiling* logger.\n\n::\n\n from profiling import Profiler\n profiler = Profiler('Complex Computation', start=True)\n # code with some complex computations\n profiler.stop()\n\n**Example 5**\n\nUsing decorator approach. Output will be logged to *profiling.complex_computations* logger.\n\n::\n\n from profiling import profile\n\n @profile\n def complex_computations():\n #some complex computations\n\n**Example 6**\n\nUsing decorator approach. Output will be logged to *profiling.ComplexClass.complex_computations* logger.\n\n::\n\n from profiling import profile\n\n class ComplexClass(object):\n @profile\n def complex_computations():\n #some complex computations\n\n**Example 7**\n\nUsing decorator approach. Output will be logged to *profiling.complex_computations* logger.\n`profile` execution stats are logged to *profiling.complex_computations* logger.\n\n::\n\n from profiling import profile\n\n @profile(stats=True)\n def complex_computations():\n #some complex computations\n\n**Example 8**\n\nUsing decorator approach. Output will be logged to *profiling.complex_computations* logger.\n`profile` execution stats are printed to sys.stdout.\n\n::\n\n import sys\n\n from profiling import profile\n\n @profile(stats=True, stats_buffer=sys.stdout)\n def complex_computations():\n #some complex computations\n\n\n**Example 9**\n\nUsing decorator approach. Output will be logged to *profiling.ComplexClass.complex_computations* logger.\n`profile` stats will be logged to *profiling.ComplexClass.complex_computations*.\n\n::\n\n from profiling import profile\n\n class ComplexClass(object)\n @profile(stats=True)\n def complex_computations():\n #some complex computations\n\n\nTests\n-----\n\n**Tested on evnironment**\n\n- Xubuntu Linux 11.10 oneiric 64-bit\n- python 2.7.2+\n- python unittest\n\n**Running tests**\n\nTo run the test run command: ::\n\n $ python test.py\n $ python setup.py test\n\n\nAuthor\n------\n\n| char0n (Vladim\u00edr Gorej, CodeScale s.r.o.)\n| email: gorej@codescale.net\n| web: http://www.codescale.net\n\n\nReferences\n----------\n\n- http://github.com/CodeScaleInc/django-profiler\n- http://pypi.python.org/pypi/django-profiler/\n- http://www.codescale.net/en/community#django-profiler", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/char0n/django-profiler/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.codescale.net/en/community#django-profiler", "keywords": "django profiler profiling code profile", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-profiler", "package_url": "https://pypi.org/project/django-profiler/", "platform": "any", "project_url": "https://pypi.org/project/django-profiler/", "project_urls": { "Download": "http://github.com/char0n/django-profiler/tarball/master", "Homepage": "http://www.codescale.net/en/community#django-profiler" }, "release_url": "https://pypi.org/project/django-profiler/2.0.0/", "requires_dist": null, "requires_python": null, "summary": "util for profiling python code mainly in django projects, but can be used also on ordinary python code", "version": "2.0.0" }, "last_serial": 862588, "releases": { "1.0b": [ { "comment_text": "", "digests": { "md5": "34c9db856a3c8572e83a052c632d2047", "sha256": "25eddc8e79c833ff2c7d9b8ee745251a77817bc5d60e8ca713acf988047feee7" }, "downloads": -1, "filename": "django-profiler-1.0b.tar.gz", "has_sig": false, "md5_digest": "34c9db856a3c8572e83a052c632d2047", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5129, "upload_time": "2011-11-05T15:36:59", "url": "https://files.pythonhosted.org/packages/b8/eb/2165019fb07982a8bdf221788430f0b2da2660d470b4f275acae3d5daa20/django-profiler-1.0b.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "aae9fb633a860fe437d116ee646498c3", "sha256": "05b2209391343d7fede64253b72e5008f19d00d8a77c8cb75f5a0e01ab2e6d93" }, "downloads": -1, "filename": "django-profiler-1.0b2.tar.gz", "has_sig": false, "md5_digest": "aae9fb633a860fe437d116ee646498c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4910, "upload_time": "2011-11-08T10:39:17", "url": "https://files.pythonhosted.org/packages/17/af/0c2bf6f5cbc12ae507bc46fa93467ad5a05c4c0fcd1857fb606082b3bf44/django-profiler-1.0b2.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "b852928925abb1c3303160b9e0eb854f", "sha256": "2bf9a3f5d6274d950bc633c998942cf7dfe51701a5e2a08850c41539a3582425" }, "downloads": -1, "filename": "django-profiler-1.0b3.tar.gz", "has_sig": false, "md5_digest": "b852928925abb1c3303160b9e0eb854f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5771, "upload_time": "2011-11-24T17:06:18", "url": "https://files.pythonhosted.org/packages/59/90/d8b8b351ebd5025c803520f5b3a0a91b6241e09ceb4b30083da940919023/django-profiler-1.0b3.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8ce3d7bc47498e26bf4a851cba4fe325", "sha256": "36d2424a4f64e9140d2c050c973dc0dc8da91a363a30b9a5d0515ce122db5e8a" }, "downloads": -1, "filename": "django-profiler-1.1.tar.gz", "has_sig": false, "md5_digest": "8ce3d7bc47498e26bf4a851cba4fe325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10112, "upload_time": "2012-02-16T19:29:20", "url": "https://files.pythonhosted.org/packages/74/83/3a0911211d1e7b2a8358036d8b2ad70faf7cbd060693f535dd30bd5a69d1/django-profiler-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "594dcb337943b132a284774cf31490c2", "sha256": "0bf117ddf349fb6f6118d0b8a85071a8647ffba2a6478dff6c7a3c037ed17a1d" }, "downloads": -1, "filename": "django-profiler-1.1.1.tar.gz", "has_sig": false, "md5_digest": "594dcb337943b132a284774cf31490c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8912, "upload_time": "2013-08-09T15:31:17", "url": "https://files.pythonhosted.org/packages/2f/61/ab94258ffa3da300d9a56a0a1f2aa32b338d78f41bec882ccaadd7475cdf/django-profiler-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "c05af95a7b5fc28382df0daa26af5d02", "sha256": "7c742c6d1610efa2eaeee602b2b64bdc94eda3c462c167e4a83d6d3cecbc064a" }, "downloads": -1, "filename": "django-profiler-1.1.2.tar.gz", "has_sig": false, "md5_digest": "c05af95a7b5fc28382df0daa26af5d02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8857, "upload_time": "2013-08-09T15:58:48", "url": "https://files.pythonhosted.org/packages/03/b3/6b09f1fac8f20443352570e9684dc386cc687c9d1b821e04e88ff9717a3f/django-profiler-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "7363070e6f49163d595dadad88d3978d", "sha256": "ddcdb982bab1f1c27f48fc875538137606ce43052ce9b49b775ac0ad752a2349" }, "downloads": -1, "filename": "django-profiler-1.1.3.tar.gz", "has_sig": false, "md5_digest": "7363070e6f49163d595dadad88d3978d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8904, "upload_time": "2013-08-09T16:06:37", "url": "https://files.pythonhosted.org/packages/ad/be/1fd89abbaecba82bbb920e0e8a76a2960556fa420f8c94caf0285de9da8e/django-profiler-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "a81d28e49fbcb1c95403a239a9357464", "sha256": "3826ed597d40111bba1cb78aea0c5bc2d1d0343057aed182b483d0eb1c03481e" }, "downloads": -1, "filename": "django-profiler-1.1.4.tar.gz", "has_sig": false, "md5_digest": "a81d28e49fbcb1c95403a239a9357464", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8858, "upload_time": "2013-08-09T16:10:32", "url": "https://files.pythonhosted.org/packages/6b/5b/3f8d23d1e50d73987dfcc515f272b86d9d31f54d05178e3599e038bf50b7/django-profiler-1.1.4.tar.gz" } ], "1.1.5": [ { "comment_text": "", "digests": { "md5": "c6d42600a1e6b7d63e72414e2bbe3078", "sha256": "ef2a46782e6eabd862b05fa334b78e00cbcfb0f6b7c947ca2a0cb838683692ea" }, "downloads": -1, "filename": "django-profiler-1.1.5.tar.gz", "has_sig": false, "md5_digest": "c6d42600a1e6b7d63e72414e2bbe3078", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8868, "upload_time": "2013-08-09T16:32:46", "url": "https://files.pythonhosted.org/packages/73/3d/1cbba1b0bebcabb41ff78707bf0fcbbd31893f60d4650facdb0a0753b7b0/django-profiler-1.1.5.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "1704a167cb0dadb1f77652d923d09032", "sha256": "ee5e5619521f1ce896753716f0eda947c402850450577a3a1e9b7204d9cbcf20" }, "downloads": -1, "filename": "django-profiler-2.0.0.tar.gz", "has_sig": false, "md5_digest": "1704a167cb0dadb1f77652d923d09032", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6077, "upload_time": "2013-09-11T10:24:07", "url": "https://files.pythonhosted.org/packages/6b/c1/6a85b662c6812b3d51bd70d0624159ca80dd7085415e5080996c328833d9/django-profiler-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1704a167cb0dadb1f77652d923d09032", "sha256": "ee5e5619521f1ce896753716f0eda947c402850450577a3a1e9b7204d9cbcf20" }, "downloads": -1, "filename": "django-profiler-2.0.0.tar.gz", "has_sig": false, "md5_digest": "1704a167cb0dadb1f77652d923d09032", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6077, "upload_time": "2013-09-11T10:24:07", "url": "https://files.pythonhosted.org/packages/6b/c1/6a85b662c6812b3d51bd70d0624159ca80dd7085415e5080996c328833d9/django-profiler-2.0.0.tar.gz" } ] }