#python-module #component #trace #com #hook #running #information

bin+lib functiontrace-server

The server component that FunctionTrace (functiontrace.com) clients will spawn and connect to

25 unstable releases (6 breaking)

0.7.1 Sep 26, 2023
0.6.1 Sep 10, 2023
0.5.4 Jun 9, 2023
0.5.2 Feb 25, 2023
0.1.4 May 21, 2020

#202 in Debugging

Download history 4/week @ 2024-02-13 29/week @ 2024-02-20 31/week @ 2024-02-27 11/week @ 2024-03-05 17/week @ 2024-03-12 29/week @ 2024-03-26 116/week @ 2024-04-02

163 downloads per month

Custom license

65KB
1K SLoC

See https://functiontrace.com/ for end user instructions and demos.

Functiontrace is implemented as two components:

  1. A server, written in Rust, which aggregates trace information from running processes
  2. A python module, written in C and Python, which hooks in to the various traced events.

Development Info

Developing with Nix

With Nix, we use devenv to have a standard test and development environment. The standard development loop is to setup that environemt using devenv shell.

You can test small changes inside an existing devenv shell, including working with most of our supported Python variants. To rebuild the Python module, you need to convince Nix to rebuild this (by running just generate-nix), then restarting your devenv shell.

Developing with standard Python

Building the server

$ cargo build --release

Building the python module

$ cd py-functiontrace
$ python setup.py build
$ python setup.py bdist_wheel --dist-dir ./dist

# You may also want to install it
$ pip install py-functiontrace/dist/*.whl

Testing

You must have functiontrace installed, and have functiontrace-server in your $PATH. The Nix development path should do this for you.

# The test script will use the server built in target/release
$ python integration_tests.py

Dependencies

~13–28MB
~413K SLoC