{ "info": { "author": "Mike C. Fletcher", "author_email": "mcfletch@vrplumber.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "RunSnakeRun\n===========\n\nprofile-viewer (RunSnakeRun) is a small GUI utility that allows you to\nview (Python) cProfile or Profile profiler dumps in a sortable GUI view.\n\u00a0It allows you to explore the profiler information using a \u201csquare map\u201d\nvisualization or sortable tables of data.\u00a0 It also (experimentally)\nallows you to view the output of the Meliae \u201cmemory analysis\u201d tool using\nthe same basic visualisations.\n\nFeatures\n--------\n\nRunSnakeRun is a simple program, it doesn\u2019t provide all the\nbells-and-whistles of a program like KCacheGrind, it\u2019s intended to allow\nfor profiling your Python programs, and just your Python programs. \u00a0What\nit does provide, for profile viewing:\n\n- sortable data-grid views for raw profile information\n\n- identity: function name, file-name, directory name\n- time-spent: cumulative, cumulative-per, local and local-per time\n\n- overall data-grid view\n- (all) callers-of-this-function, (all) callees-of-this-function views\n\n- squaremap view of call tree\n\n- size proportional to amount of time spent by the given parent in the\n given function\n\n- squaremap view of packages/modules/functions\n\n- size proportional to time spent in each package/module/function\n\n- basic navigation (home, back, up)\n\nFor `Meliae `__ memory-dump viewing, it\nprovides:\n\n- sortable data-grid views\n- squaremap of memory-usage\n- basic navigation\n\nInstallation\n------------\n\nYou will need to have all of wxPython,\n`SquareMap `__ and\n`RunSnakeRun `__ installed to\nuse RunSnakeRun. \u00a0You may also need the \u201cpython-profiler\u201d package for\nyour platform, which provides the pstats view.\u00a0 You will likely want to\nuse your platform wxPython package (i.e.\u00a0a pre-built binary). For\nDebian/Ubuntu distributions the prerequisite setup looks like this:\nRunSnakeRun and SquareMap will install well in a VirtualEnv if you would\nlike to keep them isolated (normally you do not want to use the\n``--no-site-packages`` flag if you are doing this).\u00a0 I recommend this\napproach rather than using easy\\_install directly on your Linux/OS-X\nhost.\n\n::\n\n virtualenv runsnake\n source runsnake/bin/activate\n\nIf you already have Python pip installed (a.k.a.\n`pip `__), you should be able to install\nthe Python packages with:\n\n::\n\n pip install profile-viewer\n\nYou will require a modern `wxPython\n(e.g.\u00a04.0) `__ and Python 3.x (e.g.\u00a03.3\nthrough 3.6 installation. \u00a0The setup will create a script named\n\u201crunsnake\u201d on Linux machines which launches the profile viewer.\u00a0 On OS-X\nmachines a wrapper script runsnake is created that runs the runsnake32\nexecutable with a flag to tell Python to use the 32-bit implementation\n(for wxPython compatibility).\u00a0 On Win32 machines, a\nScripts:raw-latex:`\\runsnake`.exe executable is created.\u00a0 If you have\nadded your scripts directory to the PATH then this will be available\nfrom the command-line.\n\nUsage\n-----\n\nIf you are new to profiling you may wish to check out:\n\n- my (`Mike Fletcher `__\\ \u2019s) `presentation\n at PyCon\n 2009 `__\n which tries to explain the use of profiling as a tool for\n optimization in Python\n\n- `W. Matthew Wilson\u2019s presentation at\n PyOhio `__ on optimizing Python code\n\ncProfile Viewing\n~~~~~~~~~~~~~~~~\n\nTo use cProfile to capture your application\u2019s profile data, either using\nthe command-line, like so:\n\n::\n\n $ python -m cProfile -o \n\nOr in code, like so:\n\n::\n\n import cProfile\n command = \"\"\"reactor.run()\"\"\"\n cProfile.runctx( command, globals(), locals(), filename=\"OpenGLContext.profile\" )\n\nTo view the results of your run:\n\n::\n\n python runsnake.py OpenGLContext.profile\n\nThere will be a brief delay as the application is created and begins the\nloading process, then you should see something like this:\n\n.. figure:: https://cloud.githubusercontent.com/assets/15351036/25775877/29669478-3275-11e7-9795-69c8218043d0.png\n :alt: Screenshot of the application viewing a HotShot profile\n\n Screenshot of the application viewing a HotShot profile\n\nClick on any column title to sort by that property within that list.\n\u00a0Select a record in the left-most list view to see a breakdown of that\nrecord in the right-side list views. \u00a0Choose the appropriate view on the\nright via the tabs. \u00a0You can resize the borders between the lists and\nsquare-map views. \u00a0You can select a package/module/function hierarchic\nview via the menus. \u00a0You can also toggle use of percentage displays\nthere.\n\nMeliae Memory Analysis\n~~~~~~~~~~~~~~~~~~~~~~\n\nNote: this feature is considered experimental, the memory consumed\nloading even a tiny meliae dump is enormous, so real-world programs will\nmake RunSnakeRun quite slow and require a very large amount of RAM (far\nmore than the process being viewed).\n\nTo install `Meliae `__, you will need a\nworking C extension compilation environment (Meliae uses a Cython\nextension):\n\n::\n\n easy_install meliae\n\nNow instrument your application to be able to trigger a memory dump at\nthe moment you would like to capture, like so:\n\n::\n\n from meliae import scanner\n scanner.dump_all_objects( filename ) # you can pass a file-handle if you prefer\n\nThe memory dump will generally be quite large (e.g.\u00a02MB to describe an\napplication with 200KB of user-controllable memory usage (i.e.\u00a0not the\ninterpreter itself)) and for any real application will take an extremely\nlong time to load (multiple minutes for 16MB dumps).\n\n::\n\n $ runsnakemem \n\n.. figure:: https://cloud.githubusercontent.com/assets/15351036/25775876/200c1290-3275-11e7-9fe7-6f943714bb11.png\n :alt: Screenshot of a meliae memory view\n\n Screenshot of a meliae memory view\n\nThe Meliae loader in RunSnakeRun performs the following simplifications:\n\n- only displays memory which is reachable from a module (there is\n normally > 1MB of unreachable objects included in a meliae dump)\n\n- treats modules as memory-cost barriers, so referencing a module does\n not cost the referrer anything\n- treats all (reachable) references to an instance as sharing the cost\n of the instance equally\n- treats loops as being a separate object which holds all objects in\n the loop, breaking inter-loop references but retaining child\n references, all references to the loop members become references to\n the loop\n- eliminates dictionary objects from modules (always) and from types\n and classes when the dictionary is only referenced by the class/type,\n the cost of the dictionary is folded into the cost of the parent\n object (note: this means that function **globals** references are\n \u201c0-cost\u201d and do not create loops)\n- compresses large numbers (>=10 currently) of \u201csimple\u201d objects of the\n same type held by a single parent into a \u201c\u201d object with the type as\n the name\n\nEven with those simplifications, however, the program is tracking most\nints, strings, tuples, lists, etc. separately, which uses a large amount\nof RAM and slows down the GUI substantially.\n\nCode Access and Contributions\n-----------------------------\n\nRunSnakeRun is reasonably stable. \u00a0I don\u2019t tend to do much work on it,\nas it tends to just work. \u00a0My (personal) current wish list for the\nproject follows:\n\n- Speed up and reduce memory requirements for meliae loading\n- Clean up the meliae loader (was grown organically from a quick hack\n and doesn\u2019t particularly invite further hacking)\n\nIf you have an idea, feel free to check out the code and\u00a0implement the\nnew\u00a0feature. \u00a0I\u2019m certainly willing to entertain new features or bug-fix\nrequests as well. \u00a0The code is available in bzr here:\n\n::\n\n git clone https://github.com/xoviat/profile-viewer.git\n cd profile-viewer\n pip install -e .\n\nYou can `contact me directly `__ if you\u2019d\nlike to contribute. \u00a0Or you can just set up a bzr branch on LaunchPad\nand request a merge.\n\nRoadmap/Wish-list\n-----------------\n\nThis is just a listing of things that either I or others have requested\nas features:\n\n- provide comparison views and \u201cprogress\u201d views that compare across\n multiple profiles\n- (re)support\u00a0Hotshot profile dumps (removed because Hotshot itself was\n deprecated)\n- support\u00a0Robert Kern\u2019s line\\_profiler module (line and import timings)\n- support\u00a0IronPython profiles (with cleanup on load to remove \u201cnoise\u201d\n functions)\n- with a line-profiling module, allow per-line profile views\n- support\u00a0(C)\u00a0calltree/cachegrind files (as used by kcachegrind)\n- clean up the UI code (very hacky)\n- configuration/storage of preferences such as column widths, rounded\n corners, padding, etc.\n- utility functions for capturing data\n\nOther Tools\n-----------\n\nRunSnakeRun is by no means a comprehensive tool-set for profiling, you\nmay want to have any or all of these other tools available for your\nprofiling needs:\n\n- `Gprof2Dot `__ \u2013\n Converts various Profile formats into dot-format graphs\n\n- Robert Kern\u2019s\n `line\\_profiler `__ \u2013\n Cython based Python profiler with line timings\n- KCacheGrind \u2013 KDE viewer for CacheGrind C-level profiler or converted\n Python profiles (via\n `pyprof2calltree `__),\n KCacheGrind is basically what RunSnakeRun started off trying to\n imitate save that RunSnakeRun was intended to be Python specific and\n cross-platform\n- `profilehooks `__ \u2013 specify\n which function to profile by using a decorator on a particular\n function\n\nCopyright 2005-2017 Contributors\n\n", "description_content_type": null, "docs_url": null, "download_url": "http://www.vrplumber.com/programming/profile_viewer/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.vrplumber.com/programming/profile_viewer/", "keywords": "profile,gui,wxPython,squaremap", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "profile-viewer", "package_url": "https://pypi.org/project/profile-viewer/", "platform": "Any", "project_url": "https://pypi.org/project/profile-viewer/", "project_urls": { "Download": "http://www.vrplumber.com/programming/profile_viewer/", "Homepage": "http://www.vrplumber.com/programming/profile_viewer/" }, "release_url": "https://pypi.org/project/profile-viewer/0.1.5/", "requires_dist": [ "SquareMap3 (>=1.0.3)", "wxPython" ], "requires_python": "", "summary": "GUI Viewer for Python profiling runs", "version": "0.1.5" }, "last_serial": 3646418, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "12f91f30eef0b45585504dd1a5bfc8ec", "sha256": "b2ca78f507f6b855c6942f8857be1bf4b781df97504aba98392ebd7abe6ab7fd" }, "downloads": -1, "filename": "profile_viewer-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "12f91f30eef0b45585504dd1a5bfc8ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32077, "upload_time": "2017-05-06T18:47:01", "url": "https://files.pythonhosted.org/packages/80/df/4785b4eb03463f5ab5cb608918577c5282228ffba9a6267dfe33024dcb2c/profile_viewer-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "461dfa3f59bf8d2b51a35999119e1f18", "sha256": "f01cc2d3a65c14f116f72f76e0a9c1e9be4f7d0691a40e73c044c76b3191a5d7" }, "downloads": -1, "filename": "profile_viewer-0.1.tar.gz", "has_sig": false, "md5_digest": "461dfa3f59bf8d2b51a35999119e1f18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 464348, "upload_time": "2017-05-06T18:48:58", "url": "https://files.pythonhosted.org/packages/09/09/50d22b718780256596ed4611df68a7f637fc0c5194b913ea098fb637b5e8/profile_viewer-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "995487b0f888d6b9dbe826cbd251e604", "sha256": "490c83718cfadce6ae0fce229daf50a356586bec00b09907ccee4b1a57091b0c" }, "downloads": -1, "filename": "profile_viewer-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "995487b0f888d6b9dbe826cbd251e604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32023, "upload_time": "2017-05-06T19:44:15", "url": "https://files.pythonhosted.org/packages/79/60/16744f59059bf940d40f8c90fbf73c267852ffc9b192562996f759b039a4/profile_viewer-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d0cbd71c3bbaa58058e2371410d1c9da", "sha256": "29e0c555564b320577ba71eeaa56bf0ea576aa83d679f02bbc86cdde3732fead" }, "downloads": -1, "filename": "profile_viewer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d0cbd71c3bbaa58058e2371410d1c9da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 464372, "upload_time": "2017-05-06T19:44:17", "url": "https://files.pythonhosted.org/packages/bb/69/ccf3edfa146d96f6387af0a76962154e44ddaa4682b8ba6e6ee0dca7f715/profile_viewer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a25fc04130eab27748c6f105762b1050", "sha256": "9063beea2012b19ca9b85989dc9e7de996ac3d6244adece81b10ad14d6c87beb" }, "downloads": -1, "filename": "profile_viewer-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a25fc04130eab27748c6f105762b1050", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32022, "upload_time": "2017-05-06T20:46:48", "url": "https://files.pythonhosted.org/packages/f6/b6/adfadffe46d87b2aca3941de995cd0944e0de237bd344666b97fb820b8c8/profile_viewer-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aa03a6bcaf4cccf7e5980a190ef48817", "sha256": "73955999958cd35300666ad62c534f77d632efb4950fa138ae4c1147afd17f9a" }, "downloads": -1, "filename": "profile_viewer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "aa03a6bcaf4cccf7e5980a190ef48817", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 464365, "upload_time": "2017-05-06T20:46:50", "url": "https://files.pythonhosted.org/packages/29/cf/8852838d9125aed010771b4c1047c760c4e9722bd3c497730b405559342f/profile_viewer-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d4d53d4fb580a84ee984c1a2a97055d0", "sha256": "ea4acaddeda6d69d843cf8ea65a88c4a6fe640813f87723a95710874483d2316" }, "downloads": -1, "filename": "profile_viewer-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d4d53d4fb580a84ee984c1a2a97055d0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 40433, "upload_time": "2017-05-06T21:57:41", "url": "https://files.pythonhosted.org/packages/fa/2e/e843e6e7997ccd949731706687e7f03fca2c236fcf7a784586922340f273/profile_viewer-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58da743b3ba9d648a9c34fc468013c39", "sha256": "adb9f14ddf6ed7d2797fe89518e918ce4baa716e699a4b3188ae397d22935f03" }, "downloads": -1, "filename": "profile_viewer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "58da743b3ba9d648a9c34fc468013c39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 472600, "upload_time": "2017-05-06T21:57:42", "url": "https://files.pythonhosted.org/packages/4e/9c/6e2d1101a122ebc1b148d660e13677b3f1e2d61d1a61c4d8de608cc5ab59/profile_viewer-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "78f5326f321317e33ba0984a37dff284", "sha256": "c4d57c17cac07fab91e8016c5151f9fc2947332d6af5920b6fdfcd3c8aec7589" }, "downloads": -1, "filename": "profile_viewer-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "78f5326f321317e33ba0984a37dff284", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 40396, "upload_time": "2017-05-09T12:23:27", "url": "https://files.pythonhosted.org/packages/76/24/2b6317c28a9accb0f4c0ee31487996c944fea8eec0c89b14b9495461cd06/profile_viewer-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0caa601808075b08f9bc4ea6baee980a", "sha256": "395ee1853a0c095309b2a417d5b3cd7d4d69118793a74c8286e0ee8954c635c1" }, "downloads": -1, "filename": "profile_viewer-0.1.4.tar.gz", "has_sig": false, "md5_digest": "0caa601808075b08f9bc4ea6baee980a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 472567, "upload_time": "2017-05-09T12:23:29", "url": "https://files.pythonhosted.org/packages/22/c3/0387a75be929bbc0bf5164a3b5a1caf256c1680c60ca6baa98aa14ebab4f/profile_viewer-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "98b65d1867b4b715d8c8f617055f1560", "sha256": "9d7dc707aaf8373b93404e548b09fd61121101ff693f00b3cb06d6e3d73f2beb" }, "downloads": -1, "filename": "profile_viewer-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "98b65d1867b4b715d8c8f617055f1560", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39889, "upload_time": "2017-08-16T03:09:19", "url": "https://files.pythonhosted.org/packages/9f/ea/f1ba5f0fcd3815d77e43212fde7bd7da9dda977224064bf210cbd0a33a01/profile_viewer-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc670e4c8f07942b1d0fb0f187ec578d", "sha256": "d24ab1af7dda1e7e6cdcf53f3c35476bbeeb2613bd23f545535447771d1077cd" }, "downloads": -1, "filename": "profile-viewer-0.1.5.tar.gz", "has_sig": false, "md5_digest": "fc670e4c8f07942b1d0fb0f187ec578d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 790929, "upload_time": "2017-08-16T03:09:20", "url": "https://files.pythonhosted.org/packages/f3/2e/9d65efec60463e39047d4b7ab3b55cbfd963294b4c194290da7f28634e62/profile-viewer-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "98b65d1867b4b715d8c8f617055f1560", "sha256": "9d7dc707aaf8373b93404e548b09fd61121101ff693f00b3cb06d6e3d73f2beb" }, "downloads": -1, "filename": "profile_viewer-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "98b65d1867b4b715d8c8f617055f1560", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39889, "upload_time": "2017-08-16T03:09:19", "url": "https://files.pythonhosted.org/packages/9f/ea/f1ba5f0fcd3815d77e43212fde7bd7da9dda977224064bf210cbd0a33a01/profile_viewer-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc670e4c8f07942b1d0fb0f187ec578d", "sha256": "d24ab1af7dda1e7e6cdcf53f3c35476bbeeb2613bd23f545535447771d1077cd" }, "downloads": -1, "filename": "profile-viewer-0.1.5.tar.gz", "has_sig": false, "md5_digest": "fc670e4c8f07942b1d0fb0f187ec578d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 790929, "upload_time": "2017-08-16T03:09:20", "url": "https://files.pythonhosted.org/packages/f3/2e/9d65efec60463e39047d4b7ab3b55cbfd963294b4c194290da7f28634e62/profile-viewer-0.1.5.tar.gz" } ] }