gossamer/performance

Values

pub fn clear_marks() -> Nil
pub fn clear_measures() -> Nil
pub fn get_entries_by_name(
  name: String,
) -> List(performance_entry.PerformanceEntry)
pub fn get_entries_by_type(
  entry_type: String,
) -> List(performance_entry.PerformanceEntry)
pub fn mark(
  name: String,
) -> Result(performance_entry.PerformanceEntry, js_error.JsError)

Records a performance mark with name at the current time. Returns an error if name collides with a built-in timing mark.

pub fn measure(
  name: String,
  from start_mark: String,
  to end_mark: String,
) -> Result(performance_entry.PerformanceEntry, js_error.JsError)

Records a measurement between two previously-recorded marks. Returns an error if either mark does not exist or name collides with a built-in timing mark.

pub fn now() -> Float

Returns a high-resolution timestamp (in milliseconds) relative to the time origin.

pub fn time_origin() -> Float

Returns the time origin — the reference point all performance timestamps are measured from.

pub fn to_json() -> dynamic.Dynamic
Search Document