# ExperimentVariantResult

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.experimentvariantresult/
> Summary: ExperimentVariantResult: Summarizes run results for an experiment variant (calculated in the store).

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Summarizes run results for an experiment variant (calculated in the store).

```csharp
public sealed record ExperimentVariantResult : IEquatable<ExperimentVariantResult>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.experimentvariantresult/">ExperimentVariantResult</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;ExperimentVariantResult&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_ExperimentVariantResult__ctor"></a> ExperimentVariantResult\(\)

```csharp
public ExperimentVariantResult()
```

## Properties

### <a id="Tracon_ExperimentVariantResult_AverageDurationMs"></a> AverageDurationMs

Gets the average duration of settled runs in milliseconds. Returns
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when no run is settled.

```csharp
public double? AverageDurationMs { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_ExperimentVariantResult_AverageScore"></a> AverageScore

Gets the average numeric score from 0 through 100 for runs assigned to this
variant. It uses the `RunScoreKind.Numeric` scores written by online evaluation.
Returns [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when no run is scored. This is not
`0`; it means unknown, consistent with the existing `RunCost`
contract.

```csharp
public double? AverageScore { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_ExperimentVariantResult_CanceledRuns"></a> CanceledRuns

Gets the number of cancelled runs.

```csharp
public required long CanceledRuns { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_CompletedRuns"></a> CompletedRuns

Gets the number of successfully completed runs.

```csharp
public required long CompletedRuns { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_Currency"></a> Currency

Gets the currency. It is populated when `TotalCost` is populated.

```csharp
public string? Currency { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_ExperimentVariantResult_CurrencyCount"></a> CurrencyCount

Gets the number of currencies this variant's runs are priced in.

```csharp
public int CurrencyCount { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

#### Remarks

Amounts in two currencies are never added: above one, `TotalCost` and
`Currency` are [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). Currencies are compared without regard
to letter case.

### <a id="Tracon_ExperimentVariantResult_ErrorRate"></a> ErrorRate

Gets the error rate among settled runs, from 0 through 1. It uses the same
calculation as `RunStatistics.ErrorRate`.

```csharp
public double? ErrorRate { get; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_ExperimentVariantResult_FailedRuns"></a> FailedRuns

Gets the number of runs that ended with an error.

```csharp
public required long FailedRuns { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_InputTokens"></a> InputTokens

Gets the total input tokens.

```csharp
public long InputTokens { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_OutputTokens"></a> OutputTokens

Gets the total output tokens.

```csharp
public long OutputTokens { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_TotalCost"></a> TotalCost

Gets the total cost for this variant. Returns [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when pricing is undefined.

```csharp
public decimal? TotalCost { get; init; }
```

#### Property Value

 [decimal](https://learn.microsoft.com/dotnet/api/system.decimal)?

### <a id="Tracon_ExperimentVariantResult_TotalRuns"></a> TotalRuns

Gets the total number of runs assigned to this variant.

```csharp
public required long TotalRuns { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_TotalTokens"></a> TotalTokens

Gets the total tokens.

```csharp
public long TotalTokens { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_ExperimentVariantResult_Variant"></a> Variant

Gets the variant name.

```csharp
public required string Variant { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_ExperimentVariantResult_Version"></a> Version

Gets the definition version served by the variant.

```csharp
public required int Version { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

## Methods

### <a id="Tracon_ExperimentVariantResult_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ExperimentVariantResult_Equals_Tracon_ExperimentVariantResult_"></a> Equals\(ExperimentVariantResult?\)

```csharp
public bool Equals(ExperimentVariantResult? other)
```

#### Parameters

`other` [ExperimentVariantResult](/api/tracon.experimentvariantresult/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ExperimentVariantResult_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_ExperimentVariantResult_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_ExperimentVariantResult_op_Equality_Tracon_ExperimentVariantResult_Tracon_ExperimentVariantResult_"></a> operator ==\(ExperimentVariantResult?, ExperimentVariantResult?\)

```csharp
public static bool operator ==(ExperimentVariantResult? left, ExperimentVariantResult? right)
```

#### Parameters

`left` [ExperimentVariantResult](/api/tracon.experimentvariantresult/)?

`right` [ExperimentVariantResult](/api/tracon.experimentvariantresult/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ExperimentVariantResult_op_Inequality_Tracon_ExperimentVariantResult_Tracon_ExperimentVariantResult_"></a> operator \!=\(ExperimentVariantResult?, ExperimentVariantResult?\)

```csharp
public static bool operator !=(ExperimentVariantResult? left, ExperimentVariantResult? right)
```

#### Parameters

`left` [ExperimentVariantResult](/api/tracon.experimentvariantresult/)?

`right` [ExperimentVariantResult](/api/tracon.experimentvariantresult/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
