ProfilerBuilder

Struct ProfilerBuilder 

Source
pub struct ProfilerBuilder<C: Category = DefaultCategory> { /* private fields */ }
Expand description

Builder for creating configured profiler instances

Implementations§

Source§

impl<C: Category> ProfilerBuilder<C>

Source

pub fn new() -> Self

Create a new profiler builder

Source

pub fn with_percentiles(self, include: bool) -> Self

Set whether to include percentiles in reports

Source

pub fn sort_by_time(self, sort: bool) -> Self

Set whether to sort operations by time in reports

Source

pub fn min_samples(self, min: u64) -> Self

Set minimum number of samples required for an operation to appear in reports

Source

pub fn group_by_category(self, group: bool) -> Self

Set whether to group operations by category in reports

Source

pub fn time_format(self, format: TimeFormat) -> Self

Set the time format for reports

Source

pub fn build(self) -> Profiler<C>

Build the profiler

Trait Implementations§

Source§

impl<C: Category> Default for ProfilerBuilder<C>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<C> Freeze for ProfilerBuilder<C>

§

impl<C> RefUnwindSafe for ProfilerBuilder<C>
where C: RefUnwindSafe,

§

impl<C> Send for ProfilerBuilder<C>

§

impl<C> Sync for ProfilerBuilder<C>

§

impl<C> Unpin for ProfilerBuilder<C>
where C: Unpin,

§

impl<C> UnwindSafe for ProfilerBuilder<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.