gossamer/performance_entry

Types

The stable properties shared by every PerformanceEntry. Subtype-specific properties (detail) and the JSON view (to_json) stay as separate functions.

pub type Fields {
  Fields(
    name: String,
    entry_type: String,
    start_time: Float,
    duration: Float,
  )
}

Constructors

  • Fields(
      name: String,
      entry_type: String,
      start_time: Float,
      duration: Float,
    )

A single performance metric produced by the Performance API.

See PerformanceEntry on MDN.

pub type PerformanceEntry

Values

pub fn detail(
  of entry: PerformanceEntry,
) -> Result(dynamic.Dynamic, Nil)

Extra data associated with the entry, or Error(Nil) if none was provided.

pub fn duration(of entry: PerformanceEntry) -> Float
pub fn entry_type(of entry: PerformanceEntry) -> String
pub fn name(of entry: PerformanceEntry) -> String
pub fn start_time(of entry: PerformanceEntry) -> Float
pub fn to_fields(entry: PerformanceEntry) -> Fields
Search Document