{ "info": { "author": "Smarkets", "author_email": "support@smarkets.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "statprof - statistical profiling for Python\n===========================================\n\n.. image:: https://travis-ci.org/smarkets/statprof.svg?branch=master\n :target: https://travis-ci.org/smarkets/statprof\n\n.. image:: https://img.shields.io/pypi/v/statprof-smarkets.svg\n :target: https://pypi.python.org/pypi/statprof-smarkets\n\nThis package provides a simple statistical profiler for Python.\n\nPython's default profiler has been ``lsprof`` for several years. This is\nan *instrumenting* profiler, which means that it saves data on every\naction of interest. In the case of lsprof, it runs at function entry\nand exit. This has problems: it can be expensive due to frequent\nsampling, and it is blind to hot spots *within* a function.\n\nIn contrast, ``statprof`` samples the call stack periodically (by\ndefault, 1000 times per second), and it correctly tracks line numbers\n*inside* a function. This means that if you have a 50-line function\nthat contains two hot loops, `statprof` is likely to report them both\naccurately.\n\n.. note::\n This package does not yet work on Windows! See the\n implementation and portability notes below for details.\n\n\nHow to get it\n-------------\n\nUse pip!\n\n::\n\n pip install statprof-smarkets\n\nWarning: it uses ``statprof`` as Python module name so this will conflict with\noriginal statprof installation if present.\n\nGitHub project page: https://github.com/smarkets/statprof\n\nPyPI page: https://pypi.python.org/pypi/statprof-smarkets\n\nBasic usage\n-----------\n\nIt's easy to get started with ``statprof``:\n\n.. code-block:: python\n\n import statprof\n\n statprof.start()\n try:\n my_questionable_function()\n finally:\n statprof.stop()\n statprof.display()\n\nOr with a contextmanager:\n\n.. code-block:: python\n\n import statprof\n \n with statprof.profile():\n my_questionable_function()\n\nOr from command line:\n\n::\n\n $ python -m statprof script.py\n # or\n $ python -m statprof -m script\n # or (this may depend on bash because http://www.gnu.org/software/bash/manual/bashref.html#ANSI_002dC-Quoting)\n $ python -m statprof -c \"import hashlib\"$'\\n'\"for i in range(10000): hashlib.md5(str(i)).hexdigest()\"\n\nFor more comprehensive help, run ``pydoc statprof``.\n\n\nPortability\n-----------\n\nBecause *statprof* uses the Unix ``itimer`` signal facility, it does not\ncurrently work on Windows. (Patches to improve portability would be\nmost welcome.)\n\n\nImplementation notes\n--------------------\n\nThe ``statprof`` profiler works by setting the Unix profiling signal\n``ITIMER_PROF`` to go off after the interval you define in the call to\n``reset()``. When the signal fires, a sampling routine is run which\nlooks at the current procedure that's executing, and then crawls up\nthe stack, and for each frame encountered, increments that frame's\ncode object's sample count. Note that if a procedure is encountered\nmultiple times on a given stack, it is only counted once. After the\nsampling is complete, the profiler resets profiling timer to fire\nagain after the appropriate interval.\n\nMeanwhile, the profiler keeps track, via ``os.times()``, how much CPU\ntime (system and user -- which is also what ``ITIMER_PROF`` tracks), has\nelapsed while code has been executing within a ``start()``/``stop()``\nblock.\n\nThe profiler also tries (as much as possible) to avoid counting or\ntiming its own code.\n\nChangelog\n---------\n\n0.2.0\n`````\n\n* forked\n* refactored\n* added configurable display format (displays full paths by default now)\n* ability to run whole scripts under statprof from command line (thanks to\n `Vincent Driessen `_ and\n `Antony Lee `_\n* added support for ``python -mstatprof -c cmd`` invocation (thanks to\n `Antony Lee `_)\n\nHistory\n-------\n\nThis package was originally written and released by\n`Andy Wingo `_.\nIt was ported to modern Python by Alex Frazer, and posted to GitHub by\nJeff Muizelaar. Maintained by `Bryan O'Sullivan `_, was forked by\nSmarkets due to package not being maintaned anymore.\n\n\nReporting bugs, contributing patches\n------------------------------------\n\nPlease report bugs using the `GitHub issue tracker `_.\n\nIf you'd like to contribute patches, please do - the source is on\nGitHub, so please just issue a pull request.\n\n::\n\n $ git clone git://github.com/smarkets/statprof", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/smarkets/statprof", "keywords": "profiling,statistical profiling,statprof", "license": "LGPL 2, see LICENSE file", "maintainer": null, "maintainer_email": null, "name": "statprof-smarkets", "package_url": "https://pypi.org/project/statprof-smarkets/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/statprof-smarkets/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/smarkets/statprof" }, "release_url": "https://pypi.org/project/statprof-smarkets/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Statistical profiling for Python", "version": "1.0.0" }, "last_serial": 2673579, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "fd8c794c584403bf3470e73525fc00e5", "sha256": "78d37f97d455d0006afeceab0c6485b9cdfb18bcf51b88d7cad2b12c34195348" }, "downloads": -1, "filename": "statprof_smarkets-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fd8c794c584403bf3470e73525fc00e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11674, "upload_time": "2015-04-17T11:31:10", "url": "https://files.pythonhosted.org/packages/df/db/08b5e7bc8089612531bf86da4eb6feedc7b5b1723ffa732af544d2fdfaab/statprof_smarkets-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee44e4a7648f00b54e53df6e8b0ba724", "sha256": "d4c3d753f9faf1ac6e468956d4533b7b121a564782ff023c238654f04d329b57" }, "downloads": -1, "filename": "statprof-smarkets-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ee44e4a7648f00b54e53df6e8b0ba724", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18016, "upload_time": "2015-04-17T11:30:54", "url": "https://files.pythonhosted.org/packages/74/cc/d90418e9693c58afb5b24c276c8fe50c6d504287ee8b1865952899adb9cd/statprof-smarkets-0.2.0.tar.gz" } ], "0.2.0c1": [ { "comment_text": "", "digests": { "md5": "55f1c9e42852a02d5e1ae11082e8c107", "sha256": "c9f26de143e20ddb4d5c7c2c023611a46c34c0616fcc948df84096cb9334d973" }, "downloads": -1, "filename": "statprof_smarkets-0.2.0c1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "55f1c9e42852a02d5e1ae11082e8c107", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10467, "upload_time": "2014-10-08T10:08:12", "url": "https://files.pythonhosted.org/packages/23/69/f82f3795c588a17f873265bf40aff2be42c12259b44efa33155990d06d19/statprof_smarkets-0.2.0c1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f1ffa2e7992907ca41dfb7eacce8567", "sha256": "f1983c7496a434273239bf35481f2d3c07dec13b0e13bf49b0048aeb39f81cf0" }, "downloads": -1, "filename": "statprof-smarkets-0.2.0c1.tar.gz", "has_sig": false, "md5_digest": "8f1ffa2e7992907ca41dfb7eacce8567", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17080, "upload_time": "2014-10-08T10:08:05", "url": "https://files.pythonhosted.org/packages/cb/48/8e3efec5f34496d58aa8ec255517312d64ba4eb1f6a55dd984e106f16df6/statprof-smarkets-0.2.0c1.tar.gz" } ], "0.2.0c2": [ { "comment_text": "", "digests": { "md5": "059930e29efdb2a99748f2c26f559b2a", "sha256": "9cc2222a7c7dea1ae5bae3b8d4b1a15dcebb0594b3e851ebbb083ccd02e25ebb" }, "downloads": -1, "filename": "statprof_smarkets-0.2.0c2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "059930e29efdb2a99748f2c26f559b2a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11497, "upload_time": "2014-10-08T17:14:29", "url": "https://files.pythonhosted.org/packages/fb/50/f8df28d264b1f1edb99e2c0785ad5697e0b3ac21d7a0e09f1a22a10d34db/statprof_smarkets-0.2.0c2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a672a3c3efcadbc2ea55872e4a1007af", "sha256": "d3883a4df43ede084b525626625bf04789e2b56da4ab3f1a5d48dd7d371f6608" }, "downloads": -1, "filename": "statprof-smarkets-0.2.0c2.tar.gz", "has_sig": false, "md5_digest": "a672a3c3efcadbc2ea55872e4a1007af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18525, "upload_time": "2014-10-08T17:14:21", "url": "https://files.pythonhosted.org/packages/bf/b5/6159b1381a2918188470b8c6def62c28e8866284d39caaf05932b5320921/statprof-smarkets-0.2.0c2.tar.gz" } ], "0.2.0c3": [ { "comment_text": "", "digests": { "md5": "3e7f032721d47b3b33e100623307b2d8", "sha256": "94afa199c453fea40e226a97eceeca1c76bd3d7cae62b1f11c2453add7d2f6a3" }, "downloads": -1, "filename": "statprof_smarkets-0.2.0c3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e7f032721d47b3b33e100623307b2d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11516, "upload_time": "2014-10-09T16:21:29", "url": "https://files.pythonhosted.org/packages/0b/08/0a0a854493e4af72630b31c47b19db691455ab94754ac91cd7ac0c8a594c/statprof_smarkets-0.2.0c3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c38b01c7e65753cc5ec1a3f34455c6f", "sha256": "05c0f26640e281679c8306e3bbbdccbd299cdf633d09202fbb6e91cf10729596" }, "downloads": -1, "filename": "statprof-smarkets-0.2.0c3.tar.gz", "has_sig": false, "md5_digest": "6c38b01c7e65753cc5ec1a3f34455c6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18548, "upload_time": "2014-10-09T16:21:19", "url": "https://files.pythonhosted.org/packages/94/3e/8422289749e5e06b74b9051867cce83425aff04d4a12d13e916a21324d5d/statprof-smarkets-0.2.0c3.tar.gz" } ], "1.0.0": [ { "comment_text": "built for Linux-3.13.0-37-generic-x86_64-with-glibc2.4", "digests": { "md5": "04da8b484e805cbf83b02006cac3e814", "sha256": "a332353bd2ea39620e0ee9f9b1999cb382800a7ad1edc66eea23bac9b24e3699" }, "downloads": -1, "filename": "statprof-smarkets-1.0.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "04da8b484e805cbf83b02006cac3e814", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13448, "upload_time": "2015-07-17T11:28:35", "url": "https://files.pythonhosted.org/packages/d1/e0/dfbd5c4915ed01829e932a1b8706b4989ceaf4e499a6c0c0ff430c88e198/statprof-smarkets-1.0.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "723d9c727da43a342042fe00486857d9", "sha256": "b1ecadfb86ead5c75d987fbc8cc0f53e1a3a6c6ea644918a67b3e8bb5036372f" }, "downloads": -1, "filename": "statprof-smarkets-1.0.0.tar.gz", "has_sig": false, "md5_digest": "723d9c727da43a342042fe00486857d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18432, "upload_time": "2015-07-17T11:28:30", "url": "https://files.pythonhosted.org/packages/91/2d/47e9c0ec4093242c2fb3b216c2379d2ef29df92275ebc234c2f8bd148eef/statprof-smarkets-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.13.0-37-generic-x86_64-with-glibc2.4", "digests": { "md5": "04da8b484e805cbf83b02006cac3e814", "sha256": "a332353bd2ea39620e0ee9f9b1999cb382800a7ad1edc66eea23bac9b24e3699" }, "downloads": -1, "filename": "statprof-smarkets-1.0.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "04da8b484e805cbf83b02006cac3e814", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13448, "upload_time": "2015-07-17T11:28:35", "url": "https://files.pythonhosted.org/packages/d1/e0/dfbd5c4915ed01829e932a1b8706b4989ceaf4e499a6c0c0ff430c88e198/statprof-smarkets-1.0.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "723d9c727da43a342042fe00486857d9", "sha256": "b1ecadfb86ead5c75d987fbc8cc0f53e1a3a6c6ea644918a67b3e8bb5036372f" }, "downloads": -1, "filename": "statprof-smarkets-1.0.0.tar.gz", "has_sig": false, "md5_digest": "723d9c727da43a342042fe00486857d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18432, "upload_time": "2015-07-17T11:28:30", "url": "https://files.pythonhosted.org/packages/91/2d/47e9c0ec4093242c2fb3b216c2379d2ef29df92275ebc234c2f8bd148eef/statprof-smarkets-1.0.0.tar.gz" } ] }