/// Marks the start of a measurement which returns a performance mark
/// structure, which is then passed to `.measure()` to finalize the duration
/// and add it to the internal buffer.
Marks the start of a measurement which returns a performance mark
structure, which is then passed to `.measure()` to finalize the duration
and add it to the internal buffer.
Marks the start of a measurement which returns a performance mark structure which is then passed to ` . measure () ` to finalize the duration and add it to the internal buffer .
pub fn mark<S: AsRef<str>>(&self, name: S) -> PerformanceMark {
    let name = name.as_ref();
    let mut counts = self.counts.lock().unwrap();
    let count = counts.entry(name.to_string()).or_insert(0);
    *count += 1;
    PerformanceMark {
      name: name.to_string(),
      count: *count,
      start: Instant::now(),
    }
  }
pub fn mark < S : AsRef < str > > ( & self , name : S ) -> PerformanceMark { let name = name . as_ref ( ) ; let mut counts = self . counts . lock ( ) . unwrap ( ) ; let count = counts . entry ( name . to_string ( ) ) . or_insert ( 0 ) ; * count += 1 ; PerformanceMark { name : name . to_string ( ) , count : * count , start : Instant :: now ( ) , } }
Marks the start of a measurement which returns a performance mark
structure, which is then passed to `.measure()` to finalize the duration
and add it to the internal buffer.
Marks the start of a measurement which returns a performance mark structure which is then passed to ` . measure () ` to finalize the duration and add it to the internal buffer .
&self
name
S