List of metrics for an application?

#1

Hi,

I am looking to identify all the metrics that are part of an application and the sequence in which they are calculated?

How can I do that from the console?

Thanks
Vasan.

0 Likes

#2

You can have all SimpleMetrics and CompoundMetrics with something like:

var cm = CompoundMetric.fetch().objs;
var sm = SimpleMetric.fetch().objs
[...sm, ...cm]

What do you mean sequence of calculation? for CompoundMetrics you can have the dependencies with:

CompoundMetric.listSimpleMetrics(expression, sourceType)
0 Likes

#3

You can also check those convenient APIs defined on any type that is MetricEvaluatable:

Methods
listMetrics(): [ Metric ] static
API for returning a list of simple and compound metrics applicable for this type (alphabetically sorted)
Returns [ Metric ]
a list of metrics

listMetricsByKind(): ListMetricsResult static
List of simple and compound metrics for this type
Returns ListMetricsResult
ListMetricsResult

0 Likes