Statistics

Struct Statistics 

Source
pub struct Statistics { /* private fields */ }
Expand description

Runtime statistics.

Implementations§

Source§

impl Statistics

§constructors & deconstructors

Source

pub fn new(nc: &Notcurses) -> Self

Allocates a Statistics object.

Source

pub fn into_ref(&self) -> &NcStats

Returns a shared reference to the inner NcStats.

Source

pub fn into_ref_mut(&mut self) -> &mut NcStats

Returns an exclusive reference to the inner NcStats.

Source§

impl Statistics

§manager methods

Source

pub fn update(&mut self, nc: &Notcurses)

Acquires an atomic snapshot of the notcurses object’s stats.

Source

pub fn reset(&mut self, nc: &Notcurses)

Resets all cumulative stats.

Immediate ones, such as fbbytes, are not reset.

Source§

impl Statistics

§query methods

Source

pub fn renders(&self) -> u64

Successful renders.

Source

pub fn failed_renders(&self) -> u64

Failed renders.

Source

pub fn render_ns(&self) -> u64

Nanoseconds spent rendering.

Source

pub fn render_max_ns(&self) -> i64

Max ns spent in render for a frame.

Source

pub fn render_min_ns(&self) -> i64

Min ns spent in render for a frame.

Source

pub fn writeouts(&self) -> u64

Successful rasterizations.

Source

pub fn failed_writeouts(&self) -> u64

Failed rasterizations.

Source

pub fn raster_bytes(&self) -> u64

Bytes emitted to ttyfp.

Source

pub fn raster_max_bytes(&self) -> i64

Max bytes emitted for a frame.

Source

pub fn raster_min_bytes(&self) -> i64

Min bytes emitted for a frame.

Source

pub fn raster_ns(&self) -> u64

Nanoseconds spent rasterizing.

Source

pub fn raster_max_ns(&self) -> i64

Max ns spent in raster for a frame.

Source

pub fn raster_min_ns(&self) -> i64

Min ns spent in raster for a frame.

Source

pub fn cell_elisions(&self) -> u64

Cells we elided entirely thanks to damage maps.

Source

pub fn cell_emissions(&self) -> u64

Total number of cells emitted to terminal.

Source

pub fn fg_elisions(&self) -> u64

RGB fg elision count.

Source

pub fn fg_emissions(&self) -> u64

RGB fg emissions.

Source

pub fn bg_elisions(&self) -> u64

RGB bg elision count.

Source

pub fn bg_emissions(&self) -> u64

RGB bg emissions.

Source

pub fn default_elisions(&self) -> u64

Default color was emitted.

Source

pub fn default_emissions(&self) -> u64

Default color was elided.

Source

pub fn sprixel_emissions(&self) -> u64

Sprixel draw count.

Source

pub fn sprixel_elisions(&self) -> u64

Sprixel elision count.

Source

pub fn sprixel_bytes(&self) -> u64

Sprixel bytes emitted.

Source

pub fn refreshes(&self) -> u64

Refresh requests (non-optimized redraw).

Source

pub fn appsync_updates(&self) -> u64

How many application-synchronized updates?

Source

pub fn input_errors(&self) -> u64

Errors processing control sequences/utf8.

Source

pub fn input_events(&self) -> u64

Characters returned to userspace.

Source

pub fn hpa_gratuitous(&self) -> u64

Unnecessary hpas issued.

The number of hpa (horizontal position absolute, see terminfo(5)) control sequences issued where not strictly necessary.

This is done to cope with fundamental ambiguities regarding glyph width. It is not generally possible to know how wide a glyph will be rendered on a given combination of font, font rendering engine, and terminal. Indeed, it is not even generally possible to know how many glyphs will result from a sequence of EGCs. As a result, Notcurses sometimes issues “gratuitous” hpa controls.

Source

pub fn cell_geo_changes(&self) -> u64

Cell geometry changes (resizes).

The number of changes to the visible area’s cell geometry.

The cell geometry changes whenever the visible area is resized without a corresponding cell-pixel geometry change.

Both can change at the same time if e.g. a terminal undergoes a font size change without changing its total size.

Source

pub fn pixel_geo_changes(&self) -> u64

Pixel geometry changes (font resize).

The number of changes to cells’ pixel geometry (i.e. the height and width of each cell), and changes whenever the font size changes.

Source

pub fn fb_bytes(&self) -> u64

Total bytes devoted to all active framebuffers.

Source

pub fn planes(&self) -> u32

Number of planes currently in existence.

Trait Implementations§

Source§

impl Clone for Statistics

Source§

fn clone(&self) -> Statistics

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Statistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Statistics

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<&mut ncstats> for Statistics

Source§

fn from(nc: &mut NcStats) -> Statistics

Converts to this type from the input type.
Source§

impl PartialEq for Statistics

Source§

fn eq(&self, other: &Statistics) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Statistics

Source§

impl StructuralPartialEq for Statistics

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.