Was an interactive continuous Python profiler.

Overview

This project is not maintained anymore. We highly recommend switching to py-spy which provides better performance and usability.


Profiling

The profiling package is an interactive continuous Python profiler. It is inspired from Unity 3D profiler. This package provides these features:

  • Profiling statistics keep the frame stack.
  • An interactive TUI profiling statistics viewer.
  • Provides both of statistical and deterministic profiling.
  • Utilities for remote profiling.
  • Thread or greenlet aware CPU timer.
  • Supports Python 2.7, 3.3, 3.4 and 3.5.
  • Currently supports only Linux.

Build Status Coverage Status

Installation

Install the latest release via PyPI:

$ pip install profiling

Profiling

To profile a single program, simply run the profiling command:

$ profiling your-program.py

Then an interactive viewer will be executed:

If your program uses greenlets, choose greenlet timer:

$ profiling --timer=greenlet your-program.py

With --dump option, it saves the profiling result to a file. You can browse the saved result by using the view subcommand:

$ profiling --dump=your-program.prf your-program.py
$ profiling view your-program.prf

If your script reads sys.argv, append your arguments after --. It isolates your arguments from the profiling command:

$ profiling your-program.py -- --your-flag --your-param=42

Live Profiling

If your program has a long life time like a web server, a profiling result at the end of program is not helpful enough. Probably you need a continuous profiler. It can be achived by the live-profile subcommand:

$ profiling live-profile webserver.py

See a demo:

asciicast

There's a live-profiling server also. The server doesn't profile the program at ordinary times. But when a client connects to the server, it starts to profile and reports the results to the all connected clients.

Start a profling server by the remote-profile subcommand:

$ profiling remote-profile webserver.py --bind 127.0.0.1:8912

And also run a client for the server by the view subcommand:

$ profiling view 127.0.0.1:8912

Statistical Profiling

TracingProfiler, the default profiler, implements a deterministic profiler for deep call graph. Of course, it has heavy overhead. The overhead can pollute your profiling result or can make your application to be slow.

In contrast, SamplingProfiler implements a statistical profiler. Like other statistical profilers, it also has only very cheap overhead. When you profile you can choose it by just --sampling (shortly -S) option:

$ profiling live-profile -S webserver.py
                         ^^

Timeit then Profiling

Do you use timeit to check the performance of your code?

$ python -m timeit -s 'from trueskill import *' 'rate_1vs1(Rating(), Rating())'
1000 loops, best of 3: 722 usec per loop

If you want to profile the checked code, simply use the timeit subcommand:

$ profiling timeit -s 'from trueskill import *' 'rate_1vs1(Rating(), Rating())'
  ^^^^^^^^^

Profiling from Code

You can also profile your program by profiling.tracing.TracingProfiler or profiling.sampling.SamplingProfiler directly:

from profiling.tracing import TracingProfiler

# profile your program.
profiler = TracingProfiler()
profiler.start()
...  # run your program.
profiler.stop()

# or using context manager.
with profiler:
    ...  # run your program.

# view and interact with the result.
profiler.run_viewer()
# or save profile data to file
profiler.dump('path/to/file')

Viewer Key Bindings

  • q - Quit.
  • space - Pause/Resume.
  • \ - Toggle layout between NESTED and FLAT.
  • and - Navigate frames.
  • - Expand the frame.
  • - Fold the frame.
  • > - Go to the hotspot.
  • esc - Defocus.
  • [ and ] - Change sorting column.

Columns

Common

  • FUNCTION
    1. The function name with the code location. (e.g. my_func (my_code.py:42), my_func (my_module:42))
    2. Only the location without line number. (e.g. my_code.py, my_module)

Tracing Profiler

  • CALLS - Total call count of the function.
  • OWN (Exclusive Time) - Total spent time in the function excluding sub calls.
  • /CALL after OWN - Exclusive time per call.
  • % after OWN - Exclusive time per total spent time.
  • DEEP (Inclusive Time) - Total spent time in the function.
  • /CALL after DEEP - Inclusive time per call.
  • % after DEEP - Inclusive time per total spent time.

Sampling Profiler

  • OWN (Exclusive Samples) - Number of samples which are collected during the direct execution of the function.
  • % after OWN - Exclusive samples per number of the total samples.
  • DEEP (Inclusive Samples) - Number of samples which are collected during the excution of the function.
  • % after DEEP - Inclusive samples per number of the total samples.

Testing

There are some additional requirements to run the test code, which can be installed by running the following command.

$ pip install $(python test/fit_requirements.py test/requirements.txt)

Then you should be able to run pytest.

$ pytest -v

Thanks to

Licensing

Written by Heungsub Lee at What! Studio in Nexon, and distributed under the BSD 3-Clause license.

Comments
  • Profiling django's dev server

    Profiling django's dev server

    Hello,

    I tried to profile django's dev server with profiling live-profile manage.py runserver, but without success. The viewer seems that is showing only calls for bootstrapping django. Nothing happens as requests are made to the server. Am I missing something? Or is what I am trying to do currently not supported?

    bug 
    opened by Ernest0x 16
  • Cannot profile programs with arguments

    Cannot profile programs with arguments

    python -m profiling live-profile -i 5 ./runtests.py '-k test_full_stack_benchmarks.py -v --bench --bench-only' Usage: main.py live-profile [OPTIONS] SCRIPT [ARGV]...

    Error: no such option: -k

    opened by thedrow 6
  • Run twisted concurently

    Run twisted concurently

    Is there anyway I can run profile with twisted? I tried running like python -m profiling profile =twistd -y server.py but it doesn't seem to work. Any idea?

    Thanks.

    bug wontfix 
    opened by benmezger 6
  • Invalid Python 2 syntax

    Invalid Python 2 syntax

    In remote/asyncio.py on line 69 the new Python 3 only syntax yield from was used, making it not anymore compatible with Python 2 as stated in the README. It raises a SyntaxError.

    bug help wanted 
    opened by volans- 6
  • Can't profile with eventlet

    Can't profile with eventlet

    Can't profile a server with eventlet. I tried remote and live profile, but didn't work.

    cmdline: python -m profiling remote-profile --timer=greenlet --bind 127.0.0.1:1234 ....

    Traceback is displayed on server when I execute view. Traceback (most recent call last): File "/home/...../lib/python2.7/site-packages/eventlet/hubs/hub.py", line 346, in fire_timers timer() File "/home/...../lib/python2.7/site-packages/eventlet/hubs/timer.py", line 56, in call cb(_args, *_kw) File "/home/...../lib/python2.7/site-packages/eventlet/semaphore.py", line 121, in _do_acquire waiter.switch() error: cannot switch to a different thread

    cmdline: python -m profiling live-profile --timer=greenlet ...

    Only displays not available and server doesn't start..

    bug 
    opened by dlunch 5
  • Recursion RuntimeError on importing Requests lib

    Recursion RuntimeError on importing Requests lib

    I'm running into a weird issue while trying to profile a simple project. I isolated the problem to the Requests library.

    Just by importing requests (I tested 2.6.2 and 2.7.0), profiling will throw a recursion runtime error.

    I'm using OSX 10.10.5 and python 3.4. Can anyone replicate this behaviour?

    Here is the isolated script:

    import requests
    
    print('Hello World')
    

    This is the console output after it does nothing for a while: (NOTE: It does execute the Hello World print)

    (testenv)Mac:active-monitoring-plugin carlo$ python -m profiling profile ~/Desktop/weird.py
    Hello World
    Traceback (most recent call last):
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/__main__.py", line 674, in <module>
        cli(prog_name='python -m profiling')
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/click/core.py", line 700, in __call__
        return self.main(*args, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/click/core.py", line 680, in main
        rv = self.invoke(ctx)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/click/core.py", line 1027, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/click/core.py", line 873, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/click/core.py", line 508, in invoke
        return callback(*args, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/__main__.py", line 399, in wrapped
        return f(**kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/__main__.py", line 376, in wrapped
        return f(profiler_factory=profiler_factory, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/__main__.py", line 488, in profile
        mono=mono)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/__main__.py", line 447, in __profile__
        stats, cpu_time, wall_time = profiler.result()
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/tracing/__init__.py", line 123, in result
        frozen_stats, cpu_time, wall_time = base.result()
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/profiler.py", line 63, in result
        frozen_stats = FrozenStatistics(self.stats)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 50, in __call__
        obj = super(StatisticsMeta, cls).__call__(*args, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 257, in __init__
        self._children = self._freeze_children(stats)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 262, in _freeze_children
        return [cls(s) for s in children]
    ...
    ...
    ...
        return [cls(s) for s in children]
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 262, in <listcomp>
        return [cls(s) for s in children]
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 50, in __call__
        obj = super(StatisticsMeta, cls).__call__(*args, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 257, in __init__
        self._children = self._freeze_children(stats)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 262, in _freeze_children
        return [cls(s) for s in children]
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 262, in <listcomp>
        return [cls(s) for s in children]
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 50, in __call__
        obj = super(StatisticsMeta, cls).__call__(*args, **kwargs)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 252, in __init__
        value = getattr(stats, attr)
      File "/Users/carlo/.virtualenvs/testenv/lib/python3.4/site-packages/profiling/stats.py", line 186, in module
        module = inspect.getmodule(self.code)
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 612, in getmodule
        file = getabsfile(object, _filename)
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 595, in getabsfile
        _filename = getsourcefile(object) or getfile(object)
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 583, in getsourcefile
        if getattr(getmodule(object, filename), '__loader__', None) is not None:
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 612, in getmodule
        file = getabsfile(object, _filename)
      File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 596, in getabsfile
        return os.path.normcase(os.path.abspath(_filename))
      File "/Users/carlo/.virtualenvs/testenv/bin/../lib/python3.4/posixpath.py", line 357, in abspath
        if not isabs(path):
      File "/Users/carlo/.virtualenvs/testenv/bin/../lib/python3.4/posixpath.py", line 62, in isabs
        sep = _get_sep(s)
    RuntimeError: maximum recursion depth exceeded
    
    bug 
    opened by lockwooddev 3
  • pip install fails on Windows

    pip install fails on Windows

    Attempt to install profiling on Windows 7, Python 2.7 (32bit):

    building 'profiling.speedup' extension
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\profiling
    C:\Program Files\TDM-GCC\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-IC:\Program Files (x86)\Python\include" "-IC:\Program Files (x86)\Python\PC" -c profiling/speedup.c -o build\temp.win32-2.7\Release\profiling\speedup.o
    gcc: error: unrecognized command line option '-mno-cygwin'
    

    Tried with MinGW-gcc 4.7.2, and TDM-gcc 4.8 and 5.1.

    bug wontfix 
    opened by suurjaak 3
  • Profiler doesn't start

    Profiler doesn't start

    Traceback (most recent call last):
      File "/apps/python/2.7.6/lib/python2.7/runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "/apps/python/2.7.6/lib/python2.7/runpy.py", line 72, in _run_code
        exec code in run_globals
      File "/apps/python/2.7.6/lib/python2.7/site-packages/profiling/__main__.py", line 592, in <module>
        cli(prog_name='python -m profiling')
      File "/apps/python/2.7.6/lib/python2.7/site-packages/click/core.py", line 664, in __call__
        return self.main(*args, **kwargs)
      File "/apps/python/2.7.6/lib/python2.7/site-packages/click/core.py", line 644, in main
        rv = self.invoke(ctx)
      File "/apps/python/2.7.6/lib/python2.7/site-packages/click/core.py", line 991, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/apps/python/2.7.6/lib/python2.7/site-packages/click/core.py", line 837, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/apps/python/2.7.6/lib/python2.7/site-packages/click/core.py", line 464, in invoke
        return callback(*args, **kwargs)
      File "/apps/python/2.7.6/lib/python2.7/site-packages/profiling/__main__.py", line 347, in profile
        dump_filename=dump_filename, mono=mono)
      File "/apps/python/2.7.6/lib/python2.7/site-packages/profiling/__main__.py", line 314, in __profile__
        loop.run()
      File "/apps/python/2.7.6/lib/python2.7/site-packages/urwid/main_loop.py", line 278, in run
        self._run()
      File "/apps/python/2.7.6/lib/python2.7/site-packages/urwid/main_loop.py", line 375, in _run
        self.event_loop.run()
      File "/apps/python/2.7.6/lib/python2.7/site-packages/urwid/main_loop.py", line 678, in run
        self._loop()
      File "/apps/python/2.7.6/lib/python2.7/site-packages/urwid/main_loop.py", line 699, in _loop
        ready, w, err = select.select(fds, [], fds, timeout)
    select.error: (9, 'Bad file descriptor')
    
    bug 
    opened by moskalenko 3
  • Add profiling to PyPI

    Add profiling to PyPI

    I realize the README says this: "This project is still under development, so you should install it via GitHub instead of PyPI:" but IMO, profiling is definitely in a good enough position where a stable release can be thrown onto PyPI.

    enhancement 
    opened by hfaran 3
  • Profiling of asyncio application failing

    Profiling of asyncio application failing

    I'm trying to profile a (rather complex) asyncio application (https://github.com/kharidiron/StarryPy3k) and am running into the issue that profiling will not import from other files in the same directory.

    $ profiling live-profile --eventloop-aware=asyncio server.py

    Traceback (most recent call last): File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/bin/profiling", line 9, in load_entry_point('profiling==0.0.0.dev0', 'console_scripts', 'profiling')() File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/click/core.py", line 716, in call return self.main(_args, *_kwargs) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, _ctx.params) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/click/core.py", line 534, in invoke return callback(_args, **kwargs) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/profiling/main.py", line 525, in wrapped return f(kwargs) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/profiling/main.py", line 502, in wrapped return f(profiler_factory=profiler_factory, *kwargs) File "/Users/kharidiron/Workspace/PyCharm/VEnvs/StarryPy3k/lib/python3.5/site-packages/profiling/main.py", line 679, in live_profile exec(code, globals) File "server.py", line 5, in from configuration_manager import ConfigurationManager ImportError: No module named 'configuration_manager'

    Am I doing something wrong?

    (edit formatting)

    opened by kharidiron 2
  • `NoneType` when using live-profile

    `NoneType` when using live-profile

    When I run $ profiling live-profile manage.py runserver on a tweaked manage.py file that only prints the current path, I get

    Exception TypeError: "'NoneType' object is not callable" in <function _remove at 0x7f75f23457d0> ignored
    

    The contents of manage.py are:

    #!/usr/bin/env python
    import os
    import sys
    
    if __name__ == "__main__":
        from pprint import pprint as p
        p(sys.path)
    
        # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_app.settings")
        # from django.core.management import execute_from_command_line
        # execute_from_command_line(sys.argv)
    

    For replication (in case you are not familiar with Django): you can start a brand new Django 1.7 project with $ django-admin startproject test_app and then tweak manage.py to only figure what the path is.

    duplicate 
    opened by otrenav 2
  • Profile Flask app running uwsgi

    Profile Flask app running uwsgi

    I have a docker container that runs uwsgi to lunch my flask app, how do I profile thing? I'd like to see performance of one of my routes that's slow.

    I tried:

            environment:
                PYTHONPATH: ".:/code:/code/libs"
                FLASK_APP: "pinqueue"
                FLASK_DEBUG: "true"
                PINQUEUE_ENV: "development"
                USER: ${USER}
                TLS_ENABLED: "true"
            command: uwsgi --gevent 10 --gevent-monkey-patch --http-socket 0.0.0.0:10001 --http-websockets --module pinqueue:app --master --processes 4 --enable-threads --honour-stdin --py-autoreload=3 --buffer-size=65535
    
    opened by simkessy 0
  • In python 3.8 error `AttributeError: module 'time' has no attribute 'clock'`

    In python 3.8 error `AttributeError: module 'time' has no attribute 'clock'`

      File "profiling\tracing\timers.py", line 24, in Timer
        clock = time.clock
    AttributeError: module 'time' has no attribute 'clock'
    

    Seems need change function clock on time.perf_counter() or time.process_time()

    opened by heckad 3
  • Live profiling stops updating at some point + Crashes on repeated viewer reconnects

    Live profiling stops updating at some point + Crashes on repeated viewer reconnects

    In my use case, there is an algorithm that ends up stalling after running for a long time. I would like to use live-profiling to find the exact cause when the stall happens. It would be inconvenient to dump and post analyze since the stall happens sporadically, and restarting the run is relatively expensive.

    The issue I'm facing with this tool is that the profiling updates stop after a while, even though the main program is running as normal. One work around I found was to run in remote-profile mode, where even if the profiling updates stop, I can restart it again by reconnecting the viewer. However, repeating doing this eventually causes the below exception.

    Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 35, in serve_forever self.dispatch_sockets() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 57, in profile_periodically self.dispatch_sockets(self.interval) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 105, in dispatch_sockets self.connected(sock) File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 228, in connected self._start_profiling() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 53, in _start_profiling self.profile_periodically() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/select.py", line 56, in profile_periodically for __ in self.profiling(): File "/home/wzli/.local/lib/python3.5/site-packages/profiling/remote/init.py", line 180, in profiling self.profiler.stop() File "/home/wzli/.local/lib/python3.5/site-packages/profiling/utils.py", line 63, in stop raise RuntimeError('Not started') RuntimeError: Not started

    opened by wzli 0
  • error in pip3 install

    error in pip3 install

    sudo pip3 install profiling t always shows same error

    [Installing collected packages: profiling
      Running setup.py install for profiling ... error
        Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-emh1dfcl/profiling/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-x7q4tkex/install-record.txt --single-version-externally-managed --compile:]
    
    opened by shekharkoirala 1
  • AttributeError: 'TracingProfiler' object has no attribute 'dump'

    AttributeError: 'TracingProfiler' object has no attribute 'dump'

    https://github.com/what-studio/profiling#profiling-from-code

    while running : profiler.dump('path/to/file'), It says, AttributeError: 'TracingProfiler' object has no attribute 'dump'

    I have to save profiling results.. can someone provide a solution / alternatives?

    opened by MD-AMAAN-HAQUE 1
Releases(0.1.1)
  • 0.1.1(Dec 25, 2015)

  • first-working-prototype(Aug 12, 2015)

Owner
What! Studio
A game development studio in NEXON Company
What! Studio
Tracy Profiler module for the Godot Engine

GodotTracy Tracy Profiler module for the Godot Engine git clone --recurse-submodules https://github.com/Pineapple/GodotTracy.git Copy godot_tracy fold

Pineapple Works 17 Aug 23, 2022
Monitor Memory usage of Python code

Memory Profiler This is a python module for monitoring memory consumption of a process as well as line-by-line analysis of memory consumption for pyth

Fabian Pedregosa 80 Nov 18, 2022
Development tool to measure, monitor and analyze the memory behavior of Python objects in a running Python application.

README for pympler Before installing Pympler, try it with your Python version: python setup.py try If any errors are reported, check whether your Pyt

996 Jan 01, 2023
Cobalt Strike random C2 Profile generator

Random C2 Profile Generator Cobalt Strike random C2 Profile generator Author: Joe Vest (@joevest) This project is designed to generate malleable c2 pr

Threat Express 482 Jan 08, 2023
Prometheus exporter for Flask applications

Prometheus Flask exporter This library provides HTTP request metrics to export into Prometheus. It can also track method invocations using convenient

Viktor Adam 535 Dec 23, 2022
Exports osu! user stats to prometheus metrics for a specified set of users

osu! to prometheus exporter This tool exports osu! user statistics into prometheus metrics for a specified set of user ids. Just copy the config.json.

Peter Oettig 1 Feb 24, 2022
ASGI middleware to record and emit timing metrics (to something like statsd)

timing-asgi This is a timing middleware for ASGI, useful for automatic instrumentation of ASGI endpoints. This was developed at GRID for use with our

Steinn Eldjárn Sigurðarson 99 Nov 21, 2022
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

Glances - An eye on your system Summary Glances is a cross-platform monitoring tool which aims to present a large amount of monitoring information thr

Nicolas Hennion 22k Jan 04, 2023
Prometheus instrumentation library for Python applications

Prometheus Python Client The official Python 2 and 3 client for Prometheus. Three Step Demo One: Install the client: pip install prometheus-client Tw

Prometheus 3.2k Jan 07, 2023
Call-graph profiling for TwinCAT 3

Twingrind This project brings profiling to TwinCAT PLCs. The general idea of the implementation is as follows. Twingrind is a TwinCAT library that inc

stefanbesler 10 Oct 12, 2022
Yet Another Python Profiler, but this time thread&coroutine&greenlet aware.

Yappi Yet Another Python Profiler, but this time thread&coroutine&greenlet aware. Highlights Fast: Yappi is fast. It is completely written in C and lo

Sümer Cip 1k Jan 01, 2023
A watch dog providing a piece in mind that your Chia farm is running smoothly 24/7.

Photo by Zoltan Tukacs on Unsplash Watchdog for your Chia farm So you've become a Chia farmer and want to maximize the probability of getting a reward

Martin Mihaylov 466 Dec 11, 2022
Middleware for Starlette that allows you to store and access the context data of a request. Can be used with logging so logs automatically use request headers such as x-request-id or x-correlation-id.

starlette context Middleware for Starlette that allows you to store and access the context data of a request. Can be used with logging so logs automat

Tomasz Wójcik 300 Dec 26, 2022
Linux/OSX/FreeBSD resource monitor

Index Documents Description Features Themes Support and funding Prerequisites (Read this if you are having issues!) Dependencies Screenshots Installat

9k Jan 08, 2023
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.

GoAccess What is it? GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal on *nix systems or through y

Gerardo O. 15.6k Jan 02, 2023
Watch your Docker registry project size, then monitor it with Grafana.

Watch your Docker registry project size, then monitor it with Grafana.

Nova Kwok 33 Apr 05, 2022
pprofile + matplotlib = Python program profiled as an awesome heatmap!

pyheat Profilers are extremely helpful tools. They help us dig deep into code, find and understand performance bottlenecks. But sometimes we just want

Vishwas B Sharma 735 Dec 27, 2022
Scalene: a high-performance, high-precision CPU and memory profiler for Python

scalene: a high-performance CPU and memory profiler for Python by Emery Berger 中文版本 (Chinese version) About Scalene % pip install -U scalene Scalen

Emery Berger 138 Dec 30, 2022
Display machine state using Python3 with Flask.

Flask-State English | 简体中文 Flask-State is a lightweight chart plugin for displaying machine state data in your web application. Monitored Metric: CPU,

622 Dec 18, 2022