# Function calculateMetricsTotals

- calculateMetricsTotals(
  sessionMetrics: Iterable<ObserverSessionMetrics>,
  ): { totalTokens: number; totalCost: number }

  Aggregates token and cost totals from session metrics.

  #### Parameters

  - sessionMetrics: Iterable<ObserverSessionMetrics>

    Iterable of session metrics

  #### Returns { totalTokens: number; totalCost: number }

  Object containing total tokens and total cost

  - Defined in packages/nexus-agents/src/agents/observability/orchestration-observer-helpers.ts:195