Expand description

The analysis module provides a variety of functions for calculating information about a Run.

Re-exports

pub use self::state_helper::*;

Modules

Calculates the current pace of the active attempt based on the comparison provided. If there’s no active attempt, the final time of the comparison is returned instead.
Calculates the delta of the current attempt to the comparison provided. Additionally a value is returned that indicates whether the delta value is a live delta. A live delta indicates that the value is actively changing at the moment. This may be the case when the current attempt is slower than the comparison at the current split.
Provides functionality to calculate the chance to beat the Personal Best for either a Run or a Timer. For a Run it calculates the general chance to beat the Personal Best. For a Timer the chance is calculated in terms of the current attempt. If there is no attempt in progress it yields the same result as the PB chance for the run. The value is being reported as a floating point number in the range from 0 (0%) to 1 (100%).
Provides functions for calculating how much time save there is for either single segments or the remainder of an active attempt. This information is based on the best segments. Considering the best segments don’t represent theoretically perfect segment times, this information is only an approximation of how much time can actually be saved.
Provides different helper functions.
Provides functionality for calculating the Sum of Best Segments and the Sum of Worst Segments for whole runs or specific parts. The Sum of Best Segments is the fastest time possible to complete a run of a category, based on information collected from all the previous attempts. This often matches up with the sum of the best segment times of all the segments, but that may not always be the case, as skipped segments may introduce combined segments that may be faster than the actual sum of their best segment times. The name is therefore a bit misleading, but sticks around for historical reasons.
Provides functionality to calculate the total playtime for either a Run or a Timer. For a Run, all the durations stored in the attempt history are summed together. For a Timer, the current attempt’s duration is also factored in.

Structs

The skill curve analyzes the SegmentHistory segment history across all segments. For each Segment, the segment times are sorted by length and weighted by their recency.