All files / lib/utils performance_scaler.ts

0% Statements 0/12
0% Branches 0/1
0% Functions 0/1
0% Lines 0/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                                       
/**
 * @file performance_scaler.ts
 * Phase 8.6 — Dynamic Performance Scaling
 * ---------------------------------------
 * يضبط معدل التحديث حسب أداء الجهاز.
 */
 
import { PolicySnapshot } from '../policies/PolicyManager';
 
export function getFrameRate(policy: PolicySnapshot): number {
  switch (policy.performance) {
    case 'low':
      return 30;
    case 'medium':
      return 45;
    default:
      return 60;
  }
}