Skip to content

Conversation

@joerick
Copy link
Owner

@joerick joerick commented Oct 14, 2023

Addressing #270.

Couple of approaches.

If CLOCK_MONOTONIC_COARSE is available on the system and the desired profiling interval is slow enough, that timer is used. This timer is very low overhead, as it just accesses a variable in user-space, and never makes a syscall.

Alternatively, if the user requests it, the profiler will run a timing thread. This is a C thread that runs outside the GIL and updates a variable with the current time every <interval> seconds.

@joerick
Copy link
Owner Author

joerick commented Oct 15, 2023

I think I've figured out the ctypes thing. It seems that loading the .so file with the path works on both linux and mac.

@dralley
Copy link

dralley commented Oct 16, 2023

Also potentially addressing #83

@joerick joerick marked this pull request as ready for review July 31, 2024 16:14
@joerick joerick merged commit afbf6bb into main Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants