aclysma / profiling

Provides a very thin abstraction over instrumented profiling crates like puffin, optick, tracy, and superluminal-perf.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose thread name setter?

rksm opened this issue · comments

Hi, thanks for this library, it is great!

Since some of profiling utilities have a way to specify the thread name, would it make sense to expose a common setter in the profiling API? This would save some boilerplate when using it.

Glad it’s working well for you!

Does the api in this example do what you are looking for?

profiling::register_thread!("Main Thread");

I think some profiling APIs require the name at the start and can’t change it, but I may be misremembering.

Also, calling directly into the profiling backed you want to use is allowed. But I agree, naming a thread seems simple and universal.

Going to close this since the thread is inactive, hopefully the API I mentioned above is sufficient.