Script Index


/var/lib/sorcery/modules/libtime

This file holds various statistical functions and an interface to the activity log for getting the input data.

Synopsis

Set of functions used by gaze for time calculations


function compute_cast_times()

Parameters:

Stdout

casting time(s)

Description

Computes all the casting times of the passed spell by inspecting the activity log.


function compute_cast_time()

Parameters:

Stdout

cast time of spell in seconds

Description

Display the time in seconds a spell took to compile and install.


function compute_all_cast_times()

Parameters:

Returns:

Stdout

pretty-printed cast times of spell

Description

Display the time in seconds a spell took to compile and install. All known algorithms are used (see compute_cast_time). Mean estimates also show the estimation error.


function compute_mean()

Parameters:

Stdin

numbers separated by newlines

Stdout

mean and its error

Description

Computes the mean of the passed arguments and its standard error


function compute_weighted_mean()

Parameters:

Stdin

numbers separated by newlines

Stdout

mean value

Description

Computes the weighted mean of the passed and some more arguments. WARNING: only usable for cast times!


function compute_median()

Parameters:

Stdin

numbers separated by newlines

Stdout

median value

Description

Computes the median of the passed arguments


function compute_total_error()

Parameters:

Stdout

total error

Description

Computes the combined error of independent variables


function pretty_print_time()

Parameters:

Stdout

time (DD:HH:MM or HH:MM or MM or "less than a minute")

Description

Converts a time in seconds and the estimation error (if available) into a human readable format


function pretty_print_time_sub()

Parameters:

Stdout

time (DD:HH:MM or HH:MM or MM or "less than a minute")

Description

Converts a time in seconds into a human readable format.


function pretty_print_time_error()

Parameters:

Stdout

time +/- error (see pretty_print_time)

Description

Converts a time estimation error into a human readable format. If the error is very small or 0, it isn't shown.