> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Historical Analysis

> Platform system health historical analysis dashboard showing LCP, API response time, and error rate trends with period-over-period comparisons.

Historical Analysis is the system health page at `/settings/system-health/history` that displays 30-day trend charts and period-over-period comparisons for key platform performance metrics: Largest Contentful Paint (LCP), API response time, and API error rate.

## Overview

The page fetches 30-day metric histories via `useHistoricalMetrics` for LCP and API response time, and computes period comparisons (`week`, `month`, `quarter`) via `usePeriodComparison` for LCP, API response time, and API error rate. A performance report (weekly/monthly/quarterly) is generated via `usePerformanceReport`. Users can export metrics using `ExportMetricsDialog` and view peak usage via `PeakUsageCard`.

The parent system health route is `/settings/system-health` and requires `platform.system_health.manage`.

## Who it's for

Requires permission `platform.system_health.manage`.

## Before you start

* You must hold `platform.system_health.manage` in your role.
* Metrics are populated by the platform's observability pipeline — if no data appears, confirm with an SME that the pipeline is active.

## Steps

1. Navigate to **Settings → System Health → History** (`/settings/system-health/history`).
2. Review the 30-day trend charts for LCP and API response time.
3. Select a comparison period (Week, Month, or Quarter) to see period-over-period deltas.
4. Review `ComparisonCard` panels for each metric showing current vs. prior period values.
5. Use the **Export** button to open the metrics export dialog and download data.
6. Review the **Peak Usage** card for high-traffic periods.

## Key concepts

**LCP (Largest Contentful Paint)** — a Core Web Vital measuring perceived load speed. Tracked as `web_vital_lcp`.

**Period comparison** — compares the current period's metric average against the preceding equivalent period (week/month/quarter).

## Related

<Columns cols={2}>
  <Card title="Platform Foundation" icon="layer-group" href="/pf/overview">
    Platform Foundation overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/platform.tsx
  * src/platform/health/pages/HistoricalAnalysisPage.tsx
  * src/platform/health/hooks/useHistoricalMetrics.ts
</Accordion>
