Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce timing overhead #273

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Reduce timing overhead #273

wants to merge 16 commits into from

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

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.

None yet

2 participants