Class ComplexMetric

Class to represent a complex metric.

As a metric class, it expects to receive an array of values. However, for complex metrics that array has a single element. This class assumes that to always be true to simplify the access the values.

Author

Tiago Grosso tiagogrosso99@gmail.com

Since

0.1.0

Hierarchy

Constructors

Properties

endTime: Date

The end time.

The metric data.

The value.

Methods

  • Gets the entries that match the provided expression.

    Returns

    the entries that match the provided expression.

    Parameters

    • expression: ((pair: [key: string, value: number]) => boolean)

      expression to match the values to.

        • (pair: [key: string, value: number]): boolean
        • Parameters

          • pair: [key: string, value: number]

          Returns boolean

    Returns ComplexMetricValue

  • Returns the highest value of the metric. In case of a tie, the first value found is returned.

    Returns

    the highest value of the metric.

    Returns undefined | {
        key: string;
        value: number;
    }

  • Returns the key of the highest value of the metric. In case of a tie, the key of the first value found is returned.

    Returns

    the key of highest value of the metric.

    Returns undefined | string

  • Gets the keys of the values that are equal to the provided value.

    Returns

    the keys of the values that are equal to the provided value.

    Parameters

    • valueToCompare: number

      the value to compare to.

    Returns string[]

  • Gets the keys that match the provided expression.

    Returns

    the keys that match the provided expression.

    Parameters

    • expression: ((pair: [key: string, value: number]) => boolean)

      expression to match the values to.

        • (pair: [key: string, value: number]): boolean
        • Parameters

          • pair: [key: string, value: number]

          Returns boolean

    Returns string[]

  • Gets the keys of the values that are greater than the provided limit.

    Returns

    the keys of the values that are greater than the provided limit.

    Parameters

    • limit: number

      the limit.

    Returns string[]

  • Gets the keys of the values that are greater than or equal to the provided limit.

    Returns

    the keys of the values that are greater than or equal to the provided limit.

    Parameters

    • limit: number

      the limit.

    Returns string[]

  • Gets the keys of the values that are smaller than to the provided limit.

    Returns

    the keys of the values that are smaller than to the provided limit.

    Parameters

    • limit: number

      the limit.

    Returns string[]

  • Gets the keys of the values that are smaller than or equal to the provided limit.

    Returns

    the keys of the values that are smaller than or equal to the provided limit.

    Parameters

    • limit: number

      the limit.

    Returns string[]

  • Returns the highest value of the metric. In case of a tie, the first value found is returned.

    Returns

    the highest value of the metric.

    Returns undefined | {
        key: string;
        value: number;
    }

  • Returns the key of the lowest value of the metric. In case of a tie, the key of the first value found is returned.

    Returns

    the key of lowest value of the metric.

    Returns undefined | string

Generated using TypeDoc