# Cloud Optimization v1 API - Class AggregatedMetrics (2.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.6.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.5.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.4.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.3.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.2.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.1.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.0.0/Google.Cloud.Optimization.V1.AggregatedMetrics)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/1.0.0-beta01/Google.Cloud.Optimization.V1.AggregatedMetrics)

    public sealed class AggregatedMetrics : IMessage<AggregatedMetrics>, IEquatable<AggregatedMetrics>, IDeepCloneable<AggregatedMetrics>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class AggregatedMetrics.

Aggregated metrics for
\[ShipmentRoute\]\[google.cloud.optimization.v1.ShipmentRoute\] (resp. for
\[OptimizeToursResponse\]\[google.cloud.optimization.v1.OptimizeToursResponse\]
over all \[Transition\]\[google.cloud.optimization.v1.ShipmentRoute.Transition\]
and/or \[Visit\]\[google.cloud.optimization.v1.ShipmentRoute.Visit\] (resp. over
all \[ShipmentRoute\]\[google.cloud.optimization.v1.ShipmentRoute\]) elements.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AggregatedMetrics

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AggregatedMetrics](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.AggregatedMetrics), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AggregatedMetrics](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.AggregatedMetrics), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AggregatedMetrics](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.AggregatedMetrics), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Optimization.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1)

## Assembly

Google.Cloud.Optimization.V1.dll

## Constructors

### AggregatedMetrics()

    public AggregatedMetrics()

### AggregatedMetrics(AggregatedMetrics)

    public AggregatedMetrics(AggregatedMetrics other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.AggregatedMetrics` |

## Properties

### BreakDuration

    public Duration BreakDuration { get; set; }

Total break duration for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### Costs

    [Obsolete]
    public MapField<string, double> Costs { get; }

Deprecated: Use
\[ShipmentRoute.route_costs\]\[google.cloud.optimization.v1.ShipmentRoute.route_costs\]
and
\[OptimizeToursResponse.Metrics.costs\]\[google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs\]
instead.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.double` |   |

### DelayDuration

    public Duration DelayDuration { get; set; }

Total delay duration for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### MaxLoads

    public MapField<string, ShipmentRoute.Types.VehicleLoad> MaxLoads { get; }

Maximum load achieved over the entire route (resp. solution), for each of
the quantities on this route (resp. solution), computed as the maximum over
all
\[Transition.vehicle_loads\]\[google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads\]
(resp.
\[ShipmentRoute.metrics.max_loads\]\[google.cloud.optimization.v1.AggregatedMetrics.max_loads\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentRoute.Types.VehicleLoad` |   |

### PerformedShipmentCount

    public int PerformedShipmentCount { get; set; }

Number of shipments performed. Note that a pickup and delivery pair only
counts once.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### TotalCost

    [Obsolete]
    public double TotalCost { get; set; }

Deprecated: Use
\[ShipmentRoute.route_total_cost\]\[google.cloud.optimization.v1.ShipmentRoute.route_total_cost\]
and
\[OptimizeToursResponse.Metrics.total_cost\]\[google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost\]
instead.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### TotalDuration

    public Duration TotalDuration { get; set; }

The total duration should be equal to the sum of all durations above.
For routes, it also corresponds to:
\[ShipmentRoute.vehicle_end_time\]\[google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time\]
`-`
\[ShipmentRoute.vehicle_start_time\]\[google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time\]

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### TravelDistanceMeters

    public double TravelDistanceMeters { get; set; }

Total travel distance for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### TravelDuration

    public Duration TravelDuration { get; set; }

Total travel duration for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### VisitDuration

    public Duration VisitDuration { get; set; }

Total visit duration for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### WaitDuration

    public Duration WaitDuration { get; set; }

Total wait duration for a route or a solution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |