Struct jemalloc_ctl::Epoch [] [src]

pub struct Epoch(_);

A type providing access to the jemalloc epoch.

Many of the statistics tracked by jemalloc are cached. The epoch controls when they are refreshed.

Example

Advancing the epoch:

use jemalloc_ctl::Epoch;

let epoch = Epoch::new().unwrap();

let a = epoch.advance().unwrap();
let b = epoch.advance().unwrap();
assert_eq!(a + 1, b);

Methods

impl Epoch
[src]

[src]

Returns a new Epoch.

[src]

Advances the epoch, returning it.

The epoch advances by 1 every time it is advanced, so the value can be used to determine if another thread triggered a referesh.

Trait Implementations

impl Copy for Epoch
[src]

impl Clone for Epoch
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Epoch

impl Sync for Epoch