remotery 0.1.2

Realtime CPU Profiler with web browser viewer
Documentation
  • Coverage
  • 93.22%
    55 out of 59 items documented0 out of 11 items with examples
  • Size
  • Source code size: 259.85 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.18 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • emoon/remotery-rs
    34 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • emoon

remotery-rs Build Status Build status Crates.io

Remotery is a realtime CPU/GPU profiler with a viewer that runs in a web browser. This lib is a Rust wrapper around the C API provided by Remotery and the original repo over here https://github.com/Celtoys/Remotery where more information can be found of how to use the UI. Notice that the remotery-rs only support CPU sampling currently.

screenshot

Documentation

Usage

# Cargo.toml
[dependencies]
remotery = "0.1"

Example

extern crate remotery;

use remotery::{Remotery, RemoteryScope, SampleFlags};
use std::time::Duration;
use std::thread;

fn some_function() {
    let _scope = RemoteryScope::new("some_function", SampleFlags::Default);
    thread::sleep(Duration::from_millis(10));
}

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

    for _ in 0..1000 {
        Remotery::log_text("Doing profiling!");
        Remotery::begin_cpu_sample("test", SampleFlags::Default);
        thread::sleep(Duration::from_millis(20));
        some_function();
        Remotery::end_cpu_sample();
    }
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.