METRICS REFERENCE
Engineering Metrics

Engineering Metrics

Unlike AdTech variables—which are locked into a strict 1-to-4 scale to satisfy Ad Server constraints—the ScaleDynamics Engineering Metrics are open-ended integer scores, where higher is better.

bdp and air currently range from 1 to 4. As new generations of CPUs, GPUs, and NPUs reach the market, higher scores can appear, but an existing score never changes meaning: a device scored 3 today is still a 3 tomorrow. mdc is a number of logical processors. This gives developers stable, future-proof thresholds to route workloads.

1. bdp (Browser Device Performance)

The bdp score represents the raw processing and rendering baseline of the machine running the browser. It combines CPU clock heuristics with the browser's JavaScript engine execution efficiency.

  • Type: Integer (e.g., 1, 2, 3, 4)
  • Scale: Open-ended, currently from 1 (legacy devices) to 4 (modern high-end desktops/mobiles).
  • Primary Use Case: Adaptive UI / Component Loading. Use bdp to decide whether to load heavy visual elements, complex CSS animations, or intensive JS libraries (like Three.js or heavy charting tools).

Scale Breakdown

BDP TierClassificationDevice Profile
1Entry-levelSevere risk of INP latency and Out-Of-Memory (OOM) crashes if forced to render complex DOMs.
2BasicLimited RAM and single-core bottlenecks. Susceptible to UI lag under heavy load.
3Mid-RangeStrong rendering power, minor latency on extremely heavy concurrent tasks.
4High-EndCapable of parallel multi-threading and heavy WebGL rendering without dropping frames.

Implementation Example

async function initializeApp() {
  try {
    const bdpScore = await window.sd.bdp.get();
    
    if (bdpScore >= 3) {
      await engageExtendedUI();
    }
  } catch (error) {
    console.warn('Hardware profiling timeout, falling back to safe UI.');
  }
}

2. mdc (Maximum Device Concurrency)

The mdc score is the maximum number of logical processors the device can actually use in parallel. Think of it as the 'true' navigator.hardwareConcurrency: the value the browser should report to expose the full processing capacity of the device. This count includes the processor running the main UI, so keep one free when sizing background work.

  • Type: Integer (e.g., 2, 4, 8, 12)
  • Scale: Matches the device's processor architecture.
  • Primary Use Case: Web Worker Allocation. Use mdc to size your Web Worker pools (typically mdc - 1 workers, leaving one for the main UI) for heavy client-side computations (e.g., data parsing, state management, complex search filtering), or override navigator.hardwareConcurrency.

Implementation Example to override navigator.hardwareConcurrency

window.sd.mdc.on((mdc) => {
  Object.defineProperty(navigator, 'hardwareConcurrency', {
    get: function() {
      return mdc;
    },
    configurable: true
  });
});

Note: Run this right after creating your SdMetrics instance. The override applies once mdc is resolved, so code that read navigator.hardwareConcurrency earlier keeps the native value. It only affects the current page: Web Workers and iframes keep their own, non-overridden navigator.hardwareConcurrency.

3. air (AI Readiness Index)

The air index is a composite heuristic specifically designed for Edge AI and machine learning workloads. It evaluates the presence of hardware acceleration (WebGL/WebGPU contexts, NPU signatures).

  • Type: Integer (e.g., 1, 2, 3, 4)
  • Scale: Open-ended, currently from 1 (basic AI support) to 4 (heavy LLMs).
  • Primary Use Case: Smart Inference Routing. Use air to determine if a device can safely download and execute local models (via Transformers.js or ONNX Runtime Web) without triggering an Out-Of-Memory (OOM) tab crash.

Scale Breakdown

AIR TierClassificationDevice Profile
1Baseline EdgeLimited to sequential CPU computing. Cannot run LLMs locally without freezing the browser. Action: Route all AI prompts to Cloud APIs (OpenAI, Anthropic).
2Accelerated EdgeBasic hardware acceleration kicks in, enabling light parallel computing. Suitable for very small, quantized tasks (like basic sentiment analysis).
3High-Performance EdgeMassive firepower, capable of heavy matrix computation. Action: Safe to execute medium-sized local models in the browser to save cloud costs.
4Neural EdgeThe absolute pinnacle. Hardware featuring dedicated NPUs (Neural Processing Units) or high-end WebGPU support. Action: Execute full local LLMs and real-time computer vision entirely on the client.

Implementation Example

async function optionalAIModelLoad() {
  const aiReadiness = await window.sd.air.get();
 
  if (aiReadiness >= 3) {
    await loadAndRunAIModel();
  }
}