# Performance budget checker

- Human page: https://happytails.ai/en/developer-tools/performance-budget-checker/
- Markdown: https://happytails.ai/en/developer-tools/performance-budget-checker.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/performance-budget-checker/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `performance-budget-checker` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Runs in your browser in a background worker. Reads a HAR file, Lighthouse JSON or resource timing CSV of up to 2,000,000 characters.

### Inputs and settings

Text input: HAR file, Lighthouse JSON or resource timing CSV.

Example or placeholder shown in the interface (not a validated fixture):

```text
{"log":{"entries":[...]}}
```

Export a HAR from the browser network panel, or save a Lighthouse report as JSON. Up to 2,000,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `budget` | Budget | textarea | "[\n  {\n    \"path\": \"/*\",\n    \"resourceSizes\": [\n      {\n        \"resourceType\": \"script\",\n        \"budget\": 200\n      },\n      {\n        \"resourceType\": \"total\",\n        \"budget\": 500\n      }\n    ],\n    \"resourceCounts\": [\n      {\n        \"resourceType\": \"third-party\",\n        \"budget\": 0\n      }\n    ],\n    \"timings\": [\n      {\n        \"metric\": \"load\",\n        \"budget\": 2000\n      }\n    ]\n  }\n]\n" |  |
| `sizeMode` | Size to compare | select | "transfer" | Allowed: transfer, decoded |
| `unknownSizes` | Resources without a size | select | "not-measured" | Allowed: not-measured, count-as-zero |
| `firstPartyHosts` | First-party hosts | text | "" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 2,000,000 characters for the measured export and 100,000 characters for the budget. Processing runs locally in a background worker in your browser. Downloads: a JSON report, a CSV and a Markdown table.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "performance-budget-checker",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 2,000,000 characters for the measured export and 100,000 characters for the budget. Processing runs locally in a background worker in your browser. Downloads: a JSON report, a CSV and a Markdown table.",
  "implementation": {
    "fields": [
      {
        "key": "budget",
        "label": "Budget",
        "value": "[\n  {\n    \"path\": \"/*\",\n    \"resourceSizes\": [\n      {\n        \"resourceType\": \"script\",\n        \"budget\": 200\n      },\n      {\n        \"resourceType\": \"total\",\n        \"budget\": 500\n      }\n    ],\n    \"resourceCounts\": [\n      {\n        \"resourceType\": \"third-party\",\n        \"budget\": 0\n      }\n    ],\n    \"timings\": [\n      {\n        \"metric\": \"load\",\n        \"budget\": 2000\n      }\n    ]\n  }\n]\n",
        "type": "textarea",
        "maxLength": 100000,
        "help": "A Lighthouse budget.json array, or CSV rows kind,key,budget. Sizes are KiB, timings are milliseconds."
      },
      {
        "key": "sizeMode",
        "label": "Size to compare",
        "value": "transfer",
        "type": "select",
        "values": [
          "transfer",
          "decoded"
        ],
        "labels": {
          "transfer": "Transferred size",
          "decoded": "Decoded size"
        }
      },
      {
        "key": "unknownSizes",
        "label": "Resources without a size",
        "value": "not-measured",
        "type": "select",
        "values": [
          "not-measured",
          "count-as-zero"
        ],
        "labels": {
          "not-measured": "Report as not measured",
          "count-as-zero": "Count as zero bytes"
        }
      },
      {
        "key": "firstPartyHosts",
        "label": "First-party hosts",
        "value": "",
        "type": "text",
        "maxLength": 2000,
        "help": "Comma separated, * allowed. Empty uses the host of the first request."
      }
    ],
    "registrationFamily": "report-ingest-analysis-reference",
    "inputMaxLength": 2000000,
    "inputErrorCode": "REPORT_INGEST_ANALYSIS_REFERENCE_TOO_LONG",
    "note": "Runs in your browser in a background worker. Reads a HAR file, Lighthouse JSON or resource timing CSV of up to 2,000,000 characters.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 2000000,
      "inputMode": "text",
      "label": "HAR file, Lighthouse JSON or resource timing CSV",
      "placeholder": "{\"log\":{\"entries\":[...]}}",
      "help": "Export a HAR from the browser network panel, or save a Lighthouse report as JSON. Up to 2,000,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Check a HAR file, Lighthouse report or resource timing export against a performance budget. Each size, request count and timing gets a pass or fail with the amount over budget.

### How to use Performance budget checker

1. Paste a HAR file, a Lighthouse JSON report or a resource timing CSV.
2. Paste your budget as Lighthouse budget.json or as kind,key,budget rows.
3. Choose transfer or decoded sizes.
4. Run the check and review each budget line.
5. Download the JSON report, CSV or Markdown table.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [HTTP cache policy analyzer](https://happytails.ai/en/developer-tools/http-cache-policy-analyzer/) ([Markdown](https://happytails.ai/en/developer-tools/http-cache-policy-analyzer.md))

- [Javascript minifier](https://happytails.ai/en/developer-tools/javascript-minifier/) ([Markdown](https://happytails.ai/en/developer-tools/javascript-minifier.md))

- [CSS minifier](https://happytails.ai/en/developer-tools/css-minifier/) ([Markdown](https://happytails.ai/en/developer-tools/css-minifier.md))

## Budget format

Budgets follow the Lighthouse budget.json format: resourceSizes in KiB, resourceCounts in requests and timings in milliseconds, with an optional path pattern. When several budgets match the page path, the last one is used, as in Lighthouse.

### How resources are classified

Each request is classified by its MIME type, then by its initiator type, then by its file extension into document, script, stylesheet, image, media, font or other. A request is third-party when its host does not match the first-party hosts you list, or the host of the first request when you list none.

### Sizes and timings

Transfer size uses the HAR \_transferSize value, or body plus header size when that is missing. Decoded size uses the content size. HAR timings cover load and dom-content-loaded. Lighthouse reports supply their own resource summary and metric values.
