Struct remotery::Remotery [] [src]

pub struct Remotery { /* fields omitted */ }

Holds the main instance for Remotery

Methods

impl Remotery
[src]

Creates the global instance (with in the C lib that this code wraps) this code needs to be called before any of the other code is being called and the instance will be dropped when it goes out of scope so it's suggested to call this early in the main entry point of your program (such as main)

Examples

let _remotery = Remotery::create_global_instance().unwrap_or_else(|e| {
    panic!(e);
});

Begin a cpu sample. Notice that this call needs to be paired with end_cpu_sample. It's also possible to use RemoteryScope that will call end_cpu_scope when the scop ends.

Examples

Remotery::begin_cpu_sample("my_function", SampleFlags::Default);
// some code to profile here
Remotery::end_cpu_sample();

Ends a cpu sample. Notice that this needs to be paired with begin_cpu_sample as seen above.

Setts the name of the current thread that makes it easier to identify it in the Remotery UI

Examples

Remotery::set_current_thread_name("my_thread_name");

Can be used to log text to the remotery ui

Trait Implementations

impl Drop for Remotery
[src]

A method called when the value goes out of scope. Read more