Skip to content

alex05447/miniremotery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniremotery

Minimal Rust wrapper around the Remotery real-time CPU profiler. GPU profiling is not supported.

Inspired by (seemingly outdated and abandoned) remotery, which this is a slightly updated version of.

How to use

  1. Call Remotery::initialize at application startup.

Example

use miniremotery::Remotery;
use strum::EnumMessage;

let profiler = Remotery::initialize().unwrap_or_else(
    |error| panic!(
        "Remotery initialization error: {}"
        ,error.get_detailed_message().unwrap()
    )
);
// Remotery is finalized when `profiler` goes out of scope.
  1. Add calls to Remotery::scope to code scopes you want to profile.

Example

use miniremotery::{ Remotery, rmtSampleFlags };

fn does_something_complicated() {
    let _scope = Remotery::scope("does_something_complicated", rmtSampleFlags::RMTSF_None);

    // Some expensive calculations.

    // Remotery gathers timing data when `_scope` goes out of scope.
}
  1. Open vis/index.html when the profiled application is running to view real-time profile data.

Refer to Remotery repo for more info.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages