Skip to content

metric_property

Mario Bielert edited this page Aug 7, 2017 · 5 revisions

The metric_property is used to represent a single metric.

Fields

std::string name

The name of the metric. Used in add_metric for identification.

std::string description

The description of the metric

std::string unit

The unit of the metric values for this metric

SCOREP_MetricMode mode

The mode of this metric. This is given by the cross product of ABSOLUTE, RELATIVE, and ACCUMULATED with POINT, LAST, NEXT, and START.

SCOREP_MetricValueType type

The type of the metric values. This can one of:

  • double
  • int64
  • uint64

SCOREP_MetricBase base

The base of the metric values. Can be decimal or binary.

int64 exponent

The exponent of the metric values.

Methods

metric_property(std::string name, std::string description = "", std::string unit = "")

metric_property& absolute_point()

metric_property& absolute_last()

metric_property& absolute_next()

metric_property& accumulated_point()

metric_property& accumulated_last()

metric_property& accumulated_next()

metric_property& accumulated_start()

metric_property& relative_point()

metric_property& relative_last()

metric_property& relative_next()

metric_property& value_double()

metric_property& value_int()

metric_property& value_uint()

metric_property& decimal()

Sets the base to 10.

metric_property& binary()

Sets the base to 2.

metric_property& value_exponent(int64_t)

Sets the exponent to the given value.

Base and exponent

Base and exponent are used to scale metric values. For a given input value x the resulting scaled metric value will be calculated by:

T metric_value = x * pow(base, exponent);

Clone this wiki locally