Speed Index monitoring setup for website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1221
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1163
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    855
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1056
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    828
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    825

Setting Up Speed Index Monitoring

Speed Index is rarely optimized intentionally, though it directly reflects user perception of loading. Unlike LCP which captures one element, Speed Index measures how fast the entire visible screen fills. Values 0–3.4 seconds are good by Lighthouse scale, but real targets depend on competitive environment.

What Speed Index Is Technically

Speed Index is computed from page load video. Algorithm divides video into frames and computes percentage of visible area already rendered at each moment. Final value integrates "incompleteness" over time.

Simplified: page loading uniformly gets better SI than page empty for long then suddenly rendering.

Monitoring Tools

WebPageTest — most accurate. Runs real browser, records video, computes SI from frames. Available as public service and self-hosted via Docker.

Self-hosted WebPageTest:

docker run -d -p 4000:80 \
  -e AGENTS=1 \
  --name wpt-server \
  webpagetest/server

docker run -d \
  --network host \
  -e SERVER_URL=http://localhost:4000 \
  -e LOCATION=Test \
  --cap-add=SYS_ADMIN \
  webpagetest/agent

Lighthouse CI — integrates to CI/CD, captures SI on each deploy. Less accurate than WebPageTest, sufficient for regression tracking.

SpeedCurve — commercial tool for continuous monitoring. Runs Lighthouse and WebPageTest on schedule, builds trend graphs, alerts to Slack.

Lighthouse CI Setup for SI Tracking

npm install --save-dev @lhci/cli

.lighthouserc.js:

module.exports = {
  ci: {
    collect: {
      url: ['https://staging.example.com/', 'https://staging.example.com/catalog/'],
      numberOfRuns: 3,
      settings: {
        preset: 'desktop',
        throttlingMethod: 'simulate',
        throttling: {
          rttMs: 40,
          throughputKbps: 10240,
          cpuSlowdownMultiplier: 1,
        },
      },
    },
    assert: {
      assertions: {
        'speed-index': ['warn', { maxNumericValue: 3400 }],
        'first-contentful-paint': ['error', { maxNumericValue: 2000 }],
      },
    },
    upload: {
      target: 'lhci',
      serverBaseUrl: 'https://lhci.internal.example.com',
      token: process.env.LHCI_TOKEN,
    },
  },
};

In GitHub Actions:

- name: Run Lighthouse CI
  run: |
    npm install -g @lhci/cli
    lhci autorun
  env:
    LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
    LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}

Self-Hosted LHCI Server

For storing history and comparing deploys set up LHCI server:

npm install -g @lhci/server

# With PostgreSQL for production
DATABASE_URL=postgres://user:pass@localhost/lhci \
PORT=9001 \
LHCI_STORAGE__SQL_DIALECT=postgres \
lhci server

Or via Docker Compose:

services:
  lhci-server:
    image: patrickhulce/lhci-server
    ports:
      - "9001:9001"
    environment:
      LHCI_STORAGE__SQL_DIALECT: sqlite
      LHCI_STORAGE__SQL_DATABASE_PATH: /data/lhci.db
    volumes:
      - lhci-data:/data

WebPageTest API for Automation

WebPageTest provides REST API to run tests from CI:

# Run test
curl "https://www.webpagetest.org/runtest.php?url=https://example.com&f=json&k=${WPT_API_KEY}&runs=3&video=1" \
  | jq '.data.testId'

# Get results
curl "https://www.webpagetest.org/jsonResult.php?test=${TEST_ID}" \
  | jq '.data.median.firstView.SpeedIndex'

Via npm package webpagetest:

const WebPageTest = require('webpagetest');
const wpt = new WebPageTest('www.webpagetest.org', process.env.WPT_API_KEY);

wpt.runTest('https://example.com', {
  runs: 3,
  video: true,
  location: 'Dulles:Chrome',
  connectivity: 'Cable',
}, (err, data) => {
  const si = data.data.median.firstView.SpeedIndex;
  console.log(`Speed Index: ${si}ms`);
  if (si > 3400) process.exit(1);
});

Alerting and Thresholds

Single SI measurement is unreliable—metric depends on network, server load, random fluctuations. Proper approach: median of 3–5 runs, alert on 7-day moving average breach.

Example alert logic in Grafana:

SELECT moving_average(mean("speed_index"), 7)
FROM "lighthouse_metrics"
WHERE time > now() - 30d
GROUP BY time(1d), "page"

Alert threshold: if current value exceeds 7-day moving average by more than 20%—notify Slack.

What Affects Speed Index Most

SI degrades when:

  • Render-blocking resources delay first render (CSS in <head> without media, sync JS)
  • Fonts load without font-display: swap — text hidden until font loaded
  • Above-fold images lack explicit sizes — layout shift delays "screen fill"
  • Heavy inline scripts in <head> block parser

SI monitoring value lies not in itself, but as integral signal: if SI grows—regression in first-screen rendering somewhere, check filmstrip in WebPageTest to find exact moment where screen "froze".

Timeframe

Basic Lighthouse CI setup with SI tracking in existing pipeline — 1–2 business days. Self-hosted LHCI server with PostgreSQL, Grafana dashboard and Slack alerts — 3–5 business days. Full stack with self-hosted WebPageTest + automation via API — 1–2 weeks accounting for geographic agent setup.