wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
10.21k stars 684 forks source link

Possibility of setting TRACY_SAMPLING_HZ through an environment variable? #851

Closed FelixBrendel closed 3 months ago

FelixBrendel commented 3 months ago

Hello, thank you for the great project!

I am trying to use tracy in an linux environment where the allowed sampling frequency seems to change. Since the tracy client had to be built as a library for this use case, for now I have to recompile tracy every time I want to change the TRACY_SAMPLING_HZ since it is only a compile time macro. looking through TracySysTrace.cpp it seems there would be nothing in the way for reading TRACY_SAMPLING_HZ as an environment variable, similar to the other flags like TRACY_NO_SAMPLING? Granted, they are only booleans. What would you think about this idea?

Felix

wolfpld commented 3 months ago

Added in fb18a81d.