Struct grep_printer::Stats [−][src]
pub struct Stats { /* fields omitted */ }Summary statistics produced at the end of a search.
When statistics are reported by a printer, they correspond to all searches executed with that printer.
Methods
impl Stats[src]
impl Statspub fn new() -> Stats[src]
pub fn new() -> StatsReturn a new value for tracking aggregate statistics across searches.
All statistics are set to 0.
pub fn elapsed(&self) -> Duration[src]
pub fn elapsed(&self) -> DurationReturn the total amount of time elapsed.
pub fn searches(&self) -> u64[src]
pub fn searches(&self) -> u64Return the total number of searches executed.
pub fn searches_with_match(&self) -> u64[src]
pub fn searches_with_match(&self) -> u64Return the total number of searches that found at least one match.
pub fn bytes_searched(&self) -> u64[src]
pub fn bytes_searched(&self) -> u64Return the total number of bytes searched.
pub fn bytes_printed(&self) -> u64[src]
pub fn bytes_printed(&self) -> u64Return the total number of bytes printed.
pub fn matched_lines(&self) -> u64[src]
pub fn matched_lines(&self) -> u64Return the total number of lines that participated in a match.
When matches may contain multiple lines then this includes every line that is part of every match.
pub fn matches(&self) -> u64[src]
pub fn matches(&self) -> u64Return the total number of matches.
There may be multiple matches per line.
pub fn add_elapsed(&mut self, duration: Duration)[src]
pub fn add_elapsed(&mut self, duration: Duration)Add to the elapsed time.
pub fn add_searches(&mut self, n: u64)[src]
pub fn add_searches(&mut self, n: u64)Add to the number of searches executed.
pub fn add_searches_with_match(&mut self, n: u64)[src]
pub fn add_searches_with_match(&mut self, n: u64)Add to the number of searches that found at least one match.
pub fn add_bytes_searched(&mut self, n: u64)[src]
pub fn add_bytes_searched(&mut self, n: u64)Add to the total number of bytes searched.
pub fn add_bytes_printed(&mut self, n: u64)[src]
pub fn add_bytes_printed(&mut self, n: u64)Add to the total number of bytes printed.
pub fn add_matched_lines(&mut self, n: u64)[src]
pub fn add_matched_lines(&mut self, n: u64)Add to the total number of lines that participated in a match.
pub fn add_matches(&mut self, n: u64)[src]
pub fn add_matches(&mut self, n: u64)Add to the total number of matches.
Trait Implementations
impl Clone for Stats[src]
impl Clone for Statsfn clone(&self) -> Stats[src]
fn clone(&self) -> StatsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Stats[src]
impl Debug for Statsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for Stats[src]
impl Default for Statsimpl PartialEq for Stats[src]
impl PartialEq for Statsfn eq(&self, other: &Stats) -> bool[src]
fn eq(&self, other: &Stats) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Stats) -> bool[src]
fn ne(&self, other: &Stats) -> boolThis method tests for !=.
impl Eq for Stats[src]
impl Eq for Statsimpl Add for Stats[src]
impl Add for Statstype Output = Stats
The resulting type after applying the + operator.
fn add(self, rhs: Stats) -> Stats[src]
fn add(self, rhs: Stats) -> StatsPerforms the + operation.
impl<'a> Add<&'a Stats> for Stats[src]
impl<'a> Add<&'a Stats> for Statstype Output = Stats
The resulting type after applying the + operator.
fn add(self, rhs: &'a Stats) -> Stats[src]
fn add(self, rhs: &'a Stats) -> StatsPerforms the + operation.
impl AddAssign for Stats[src]
impl AddAssign for Statsfn add_assign(&mut self, rhs: Stats)[src]
fn add_assign(&mut self, rhs: Stats)Performs the += operation.
impl<'a> AddAssign<&'a Stats> for Stats[src]
impl<'a> AddAssign<&'a Stats> for Statsfn add_assign(&mut self, rhs: &'a Stats)[src]
fn add_assign(&mut self, rhs: &'a Stats)Performs the += operation.