Share via


ExperimentMetric Constructor

Definition

Initializes a new instance of ExperimentMetric.

public ExperimentMetric(Azure.Analytics.OnlineExperimentation.LifecycleStage lifecycle, string displayName, string description, System.Collections.Generic.IEnumerable<string> categories, Azure.Analytics.OnlineExperimentation.DesiredDirection desiredDirection, Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition definition);
new Azure.Analytics.OnlineExperimentation.ExperimentMetric : Azure.Analytics.OnlineExperimentation.LifecycleStage * string * string * seq<string> * Azure.Analytics.OnlineExperimentation.DesiredDirection * Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition -> Azure.Analytics.OnlineExperimentation.ExperimentMetric
Public Sub New (lifecycle As LifecycleStage, displayName As String, description As String, categories As IEnumerable(Of String), desiredDirection As DesiredDirection, definition As ExperimentMetricDefinition)

Parameters

lifecycle
LifecycleStage

Determines whether it is included in experiment analysis.

displayName
String

A user-friendly display name for the experiment metric shown in reports and dashboards.

description
String

A detailed description of the experiment metric.

categories
IEnumerable<String>

Categories associated with the experiment metric. Used for organizing and filtering metrics.

desiredDirection
DesiredDirection

The desired direction for changes in the metric value.

definition
ExperimentMetricDefinition

The metric definition specifying how the metric value is calculated from event data. Please note ExperimentMetricDefinition is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include AverageMetricDefinition, EventCountMetricDefinition, EventRateMetricDefinition, PercentileMetricDefinition, SumMetricDefinition, UserCountMetricDefinition and UserRateMetricDefinition.

Exceptions

displayName, description, categories or definition is null.

Applies to