[{"data":1,"prerenderedAt":2673},["ShallowReactive",2],{"article-alternates":3,"article-\u002Ffr\u002Ftech\u002Fweb-performance-budgets-karar-mekanizmasi":13},{"i18nKey":4,"paths":5},"tech-004-2026-06",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Ftech\u002Fweb-performance-budgets-entscheidungsmechanismus","\u002Fen\u002Ftech\u002Fweb-performance-budgets-decision-integration","\u002Fes\u002Ftech\u002Fweb-performance-budgets-decision-making","\u002Ffr\u002Ftech\u002Fweb-performance-budgets-karar-mekanizmasi","\u002Fit\u002Ftech\u002Fperformance-budget-collegare-al-meccanismo-decisionale","\u002Fru\u002Ftech\u002Fweb-performance-budgets-connecting-to-decision-making","\u002Ftr\u002Ftech\u002Fweb-performance-budgetlari-karar-mekanizmasina-baglamak",{"_path":9,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":2667,"_id":2668,"_source":2669,"_file":2670,"_stem":2671,"_extension":2672},"tech",false,"","Web Performance Budgets : Les Intégrer aux Mécanismes de Décision","Intégrez Lighthouse CI, RUM et les alertes de régression de performance au système. La méthodologie derrière la réduction du TBT de 2190ms à 200ms.","2026-06-23",[21,22,23,24,25],"web-performance","lighthouse-ci","rum","core-web-vitals","performance-budget",9,"Roibase",{"type":29,"children":30,"toc":2654},"root",[31,39,46,51,71,76,82,87,369,382,781,797,804,816,822,827,840,1252,1257,1846,1851,1857,1862,1868,1873,2065,2070,2076,2081,2302,2313,2319,2324,2329,2550,2555,2561,2566,2580,2643,2648],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","En 2026, la performance web n'est plus « faire une page rapide » — c'est une discipline d'ingénierie où des décisions sont prises en continu. Vous déployez un site e-commerce, le score Lighthouse chute de 92 à 68, le taux de conversion passe de 3,2 % à 2,7 % — mais personne ne le remarque parce que le monitoring se limite à « le serveur est-il down ? ». Lier un performance budget au mécanisme décisionnel signifie attraper les régressions avant le déploiement, évaluer chaque commit par rapport aux seuils LCP\u002FTBT\u002FCLS, et alimenter votre pipeline d'attribution avec les données RUM. Cet article montre comment intégrer Lighthouse CI, le monitoring synthétique, RUM et l'architecture d'alertes dans un système unifié.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"quest-ce-quun-performance-budget-et-pourquoi-cest-un-système-qui-doit-le-mesurer-pas-un-humain",[44],{"type":37,"value":45},"Qu'est-ce qu'un Performance Budget et Pourquoi c'est un Système qui doit le Mesurer, Pas un Humain",{"type":32,"tag":33,"props":47,"children":48},{},[49],{"type":37,"value":50},"Un performance budget définit des seuils numériques de ressources par page : taille JavaScript maximale (par ex. 200 KB gzippé), TBT maximal (Total Blocking Time, 200 ms), LCP maximal (Largest Contentful Paint, 2,5 secondes). Ces chiffres ne sont pas arbitraires — les seuils Core Web Vitals de Google définissent la bande « bon », mais vous devez en dériver des limites plus strictes à partir des données de votre funnel de conversion sectoriel.",{"type":32,"tag":33,"props":52,"children":53},{},[54,56,62,64,69],{"type":37,"value":55},"Le scénario classique « Lighthouse 95 en dev, 72 en production » se produit pour ces raisons : un test synthétique s'exécute en laboratoire (Fast 4G, cache vide, chargement de page unique), tandis que RUM teste le vrai utilisateur avec son 3G, son cache rempli, ses chemins de navigation réels. La différence entre les deux est normale, mais les deux doivent être surveillés. Lighthouse CI détecte les régressions de bundle size à chaque PR ; RUM montre la réalité production : « 22 % des utilisateurs mobiles ont un LCP dépassant 4 secondes ». Si vous définissez le budget uniquement comme « dépasser un score de 75 », vous pouvez ajouter 100 KB au bundle et augmenter le score de 74 à 76 — la page s'alourdit, mais le score est vert. C'est pourquoi vous devez maintenir des budgets ",{"type":32,"tag":57,"props":58,"children":59},"em",{},[60],{"type":37,"value":61},"par métrique",{"type":37,"value":63}," (LCP, TBT, CLS) ",{"type":32,"tag":57,"props":65,"children":66},{},[67],{"type":37,"value":68},"et",{"type":37,"value":70}," par ressource (JS, CSS, image en MB).",{"type":32,"tag":33,"props":72,"children":73},{},[74],{"type":37,"value":75},"Un autre point : pour enforcer le budget, la review humaine ne suffit pas. « On regarde la performance en code review » ne tient pas à l'échelle avec 20 PR\u002Fjour. Le système doit mesurer, le système doit échouer, les humains doivent seulement enquêter sur pourquoi.",{"type":32,"tag":40,"props":77,"children":79},{"id":78},"lighthouse-ci-gating-de-performance-par-commit",[80],{"type":37,"value":81},"Lighthouse CI : Gating de Performance par Commit",{"type":32,"tag":33,"props":83,"children":84},{},[85],{"type":37,"value":86},"Lighthouse CI exécute un audit Lighthouse automatiquement sur chaque commit ou PR et rapporte les résultats à GitHub ou à votre dashboard interne. Intégrez-le à votre pipeline CI comme ceci :",{"type":32,"tag":88,"props":89,"children":93},"pre",{"className":90,"code":91,"language":92,"meta":16,"style":16},"language-yaml shiki shiki-themes github-dark","# .github\u002Fworkflows\u002Flighthouse-ci.yml\nname: Lighthouse CI\non: [pull_request]\njobs:\n  lighthouse:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      - uses: actions\u002Fsetup-node@v3\n      - run: npm ci && npm run build\n      - name: Run Lighthouse CI\n        run: |\n          npm install -g @lhci\u002Fcli\n          lhci autorun\n        env:\n          LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}\n","yaml",[94],{"type":32,"tag":95,"props":96,"children":97},"code",{"__ignoreMap":16},[98,110,132,157,171,184,202,215,238,258,280,301,320,329,338,351],{"type":32,"tag":99,"props":100,"children":103},"span",{"class":101,"line":102},"line",1,[104],{"type":32,"tag":99,"props":105,"children":107},{"style":106},"--shiki-default:#6A737D",[108],{"type":37,"value":109},"# .github\u002Fworkflows\u002Flighthouse-ci.yml\n",{"type":32,"tag":99,"props":111,"children":113},{"class":101,"line":112},2,[114,120,126],{"type":32,"tag":99,"props":115,"children":117},{"style":116},"--shiki-default:#85E89D",[118],{"type":37,"value":119},"name",{"type":32,"tag":99,"props":121,"children":123},{"style":122},"--shiki-default:#E1E4E8",[124],{"type":37,"value":125},": ",{"type":32,"tag":99,"props":127,"children":129},{"style":128},"--shiki-default:#9ECBFF",[130],{"type":37,"value":131},"Lighthouse CI\n",{"type":32,"tag":99,"props":133,"children":135},{"class":101,"line":134},3,[136,142,147,152],{"type":32,"tag":99,"props":137,"children":139},{"style":138},"--shiki-default:#79B8FF",[140],{"type":37,"value":141},"on",{"type":32,"tag":99,"props":143,"children":144},{"style":122},[145],{"type":37,"value":146},": [",{"type":32,"tag":99,"props":148,"children":149},{"style":128},[150],{"type":37,"value":151},"pull_request",{"type":32,"tag":99,"props":153,"children":154},{"style":122},[155],{"type":37,"value":156},"]\n",{"type":32,"tag":99,"props":158,"children":160},{"class":101,"line":159},4,[161,166],{"type":32,"tag":99,"props":162,"children":163},{"style":116},[164],{"type":37,"value":165},"jobs",{"type":32,"tag":99,"props":167,"children":168},{"style":122},[169],{"type":37,"value":170},":\n",{"type":32,"tag":99,"props":172,"children":174},{"class":101,"line":173},5,[175,180],{"type":32,"tag":99,"props":176,"children":177},{"style":116},[178],{"type":37,"value":179},"  lighthouse",{"type":32,"tag":99,"props":181,"children":182},{"style":122},[183],{"type":37,"value":170},{"type":32,"tag":99,"props":185,"children":187},{"class":101,"line":186},6,[188,193,197],{"type":32,"tag":99,"props":189,"children":190},{"style":116},[191],{"type":37,"value":192},"    runs-on",{"type":32,"tag":99,"props":194,"children":195},{"style":122},[196],{"type":37,"value":125},{"type":32,"tag":99,"props":198,"children":199},{"style":128},[200],{"type":37,"value":201},"ubuntu-latest\n",{"type":32,"tag":99,"props":203,"children":205},{"class":101,"line":204},7,[206,211],{"type":32,"tag":99,"props":207,"children":208},{"style":116},[209],{"type":37,"value":210},"    steps",{"type":32,"tag":99,"props":212,"children":213},{"style":122},[214],{"type":37,"value":170},{"type":32,"tag":99,"props":216,"children":218},{"class":101,"line":217},8,[219,224,229,233],{"type":32,"tag":99,"props":220,"children":221},{"style":122},[222],{"type":37,"value":223},"      - ",{"type":32,"tag":99,"props":225,"children":226},{"style":116},[227],{"type":37,"value":228},"uses",{"type":32,"tag":99,"props":230,"children":231},{"style":122},[232],{"type":37,"value":125},{"type":32,"tag":99,"props":234,"children":235},{"style":128},[236],{"type":37,"value":237},"actions\u002Fcheckout@v3\n",{"type":32,"tag":99,"props":239,"children":240},{"class":101,"line":26},[241,245,249,253],{"type":32,"tag":99,"props":242,"children":243},{"style":122},[244],{"type":37,"value":223},{"type":32,"tag":99,"props":246,"children":247},{"style":116},[248],{"type":37,"value":228},{"type":32,"tag":99,"props":250,"children":251},{"style":122},[252],{"type":37,"value":125},{"type":32,"tag":99,"props":254,"children":255},{"style":128},[256],{"type":37,"value":257},"actions\u002Fsetup-node@v3\n",{"type":32,"tag":99,"props":259,"children":261},{"class":101,"line":260},10,[262,266,271,275],{"type":32,"tag":99,"props":263,"children":264},{"style":122},[265],{"type":37,"value":223},{"type":32,"tag":99,"props":267,"children":268},{"style":116},[269],{"type":37,"value":270},"run",{"type":32,"tag":99,"props":272,"children":273},{"style":122},[274],{"type":37,"value":125},{"type":32,"tag":99,"props":276,"children":277},{"style":128},[278],{"type":37,"value":279},"npm ci && npm run build\n",{"type":32,"tag":99,"props":281,"children":283},{"class":101,"line":282},11,[284,288,292,296],{"type":32,"tag":99,"props":285,"children":286},{"style":122},[287],{"type":37,"value":223},{"type":32,"tag":99,"props":289,"children":290},{"style":116},[291],{"type":37,"value":119},{"type":32,"tag":99,"props":293,"children":294},{"style":122},[295],{"type":37,"value":125},{"type":32,"tag":99,"props":297,"children":298},{"style":128},[299],{"type":37,"value":300},"Run Lighthouse CI\n",{"type":32,"tag":99,"props":302,"children":304},{"class":101,"line":303},12,[305,310,314],{"type":32,"tag":99,"props":306,"children":307},{"style":116},[308],{"type":37,"value":309},"        run",{"type":32,"tag":99,"props":311,"children":312},{"style":122},[313],{"type":37,"value":125},{"type":32,"tag":99,"props":315,"children":317},{"style":316},"--shiki-default:#F97583",[318],{"type":37,"value":319},"|\n",{"type":32,"tag":99,"props":321,"children":323},{"class":101,"line":322},13,[324],{"type":32,"tag":99,"props":325,"children":326},{"style":128},[327],{"type":37,"value":328},"          npm install -g @lhci\u002Fcli\n",{"type":32,"tag":99,"props":330,"children":332},{"class":101,"line":331},14,[333],{"type":32,"tag":99,"props":334,"children":335},{"style":128},[336],{"type":37,"value":337},"          lhci autorun\n",{"type":32,"tag":99,"props":339,"children":341},{"class":101,"line":340},15,[342,347],{"type":32,"tag":99,"props":343,"children":344},{"style":116},[345],{"type":37,"value":346},"        env",{"type":32,"tag":99,"props":348,"children":349},{"style":122},[350],{"type":37,"value":170},{"type":32,"tag":99,"props":352,"children":354},{"class":101,"line":353},16,[355,360,364],{"type":32,"tag":99,"props":356,"children":357},{"style":116},[358],{"type":37,"value":359},"          LHCI_GITHUB_APP_TOKEN",{"type":32,"tag":99,"props":361,"children":362},{"style":122},[363],{"type":37,"value":125},{"type":32,"tag":99,"props":365,"children":366},{"style":128},[367],{"type":37,"value":368},"${{ secrets.LHCI_GITHUB_APP_TOKEN }}\n",{"type":32,"tag":33,"props":370,"children":371},{},[372,374,380],{"type":37,"value":373},"Dans votre config ",{"type":32,"tag":95,"props":375,"children":377},{"className":376},[],[378],{"type":37,"value":379},".lighthouserc.json",{"type":37,"value":381},", définissez les budgets :",{"type":32,"tag":88,"props":383,"children":387},{"className":384,"code":385,"language":386,"meta":16,"style":16},"language-json shiki shiki-themes github-dark","{\n  \"ci\": {\n    \"collect\": {\n      \"url\": [\"http:\u002F\u002Flocalhost:3000\u002F\"],\n      \"numberOfRuns\": 3\n    },\n    \"assert\": {\n      \"preset\": \"lighthouse:recommended\",\n      \"assertions\": {\n        \"total-byte-weight\": [\"error\", { \"maxNumericValue\": 512000 }],\n        \"total-blocking-time\": [\"error\", { \"maxNumericValue\": 200 }],\n        \"largest-contentful-paint\": [\"error\", { \"maxNumericValue\": 2500 }],\n        \"cumulative-layout-shift\": [\"error\", { \"maxNumericValue\": 0.1 }],\n        \"categories:performance\": [\"error\", { \"minScore\": 0.85 }]\n      }\n    },\n    \"upload\": {\n      \"target\": \"temporary-public-storage\"\n    }\n  }\n}\n","json",[388],{"type":32,"tag":95,"props":389,"children":390},{"__ignoreMap":16},[391,399,412,424,446,463,471,483,505,517,558,595,632,669,708,716,723,736,754,763,772],{"type":32,"tag":99,"props":392,"children":393},{"class":101,"line":102},[394],{"type":32,"tag":99,"props":395,"children":396},{"style":122},[397],{"type":37,"value":398},"{\n",{"type":32,"tag":99,"props":400,"children":401},{"class":101,"line":112},[402,407],{"type":32,"tag":99,"props":403,"children":404},{"style":138},[405],{"type":37,"value":406},"  \"ci\"",{"type":32,"tag":99,"props":408,"children":409},{"style":122},[410],{"type":37,"value":411},": {\n",{"type":32,"tag":99,"props":413,"children":414},{"class":101,"line":134},[415,420],{"type":32,"tag":99,"props":416,"children":417},{"style":138},[418],{"type":37,"value":419},"    \"collect\"",{"type":32,"tag":99,"props":421,"children":422},{"style":122},[423],{"type":37,"value":411},{"type":32,"tag":99,"props":425,"children":426},{"class":101,"line":159},[427,432,436,441],{"type":32,"tag":99,"props":428,"children":429},{"style":138},[430],{"type":37,"value":431},"      \"url\"",{"type":32,"tag":99,"props":433,"children":434},{"style":122},[435],{"type":37,"value":146},{"type":32,"tag":99,"props":437,"children":438},{"style":128},[439],{"type":37,"value":440},"\"http:\u002F\u002Flocalhost:3000\u002F\"",{"type":32,"tag":99,"props":442,"children":443},{"style":122},[444],{"type":37,"value":445},"],\n",{"type":32,"tag":99,"props":447,"children":448},{"class":101,"line":173},[449,454,458],{"type":32,"tag":99,"props":450,"children":451},{"style":138},[452],{"type":37,"value":453},"      \"numberOfRuns\"",{"type":32,"tag":99,"props":455,"children":456},{"style":122},[457],{"type":37,"value":125},{"type":32,"tag":99,"props":459,"children":460},{"style":138},[461],{"type":37,"value":462},"3\n",{"type":32,"tag":99,"props":464,"children":465},{"class":101,"line":186},[466],{"type":32,"tag":99,"props":467,"children":468},{"style":122},[469],{"type":37,"value":470},"    },\n",{"type":32,"tag":99,"props":472,"children":473},{"class":101,"line":204},[474,479],{"type":32,"tag":99,"props":475,"children":476},{"style":138},[477],{"type":37,"value":478},"    \"assert\"",{"type":32,"tag":99,"props":480,"children":481},{"style":122},[482],{"type":37,"value":411},{"type":32,"tag":99,"props":484,"children":485},{"class":101,"line":217},[486,491,495,500],{"type":32,"tag":99,"props":487,"children":488},{"style":138},[489],{"type":37,"value":490},"      \"preset\"",{"type":32,"tag":99,"props":492,"children":493},{"style":122},[494],{"type":37,"value":125},{"type":32,"tag":99,"props":496,"children":497},{"style":128},[498],{"type":37,"value":499},"\"lighthouse:recommended\"",{"type":32,"tag":99,"props":501,"children":502},{"style":122},[503],{"type":37,"value":504},",\n",{"type":32,"tag":99,"props":506,"children":507},{"class":101,"line":26},[508,513],{"type":32,"tag":99,"props":509,"children":510},{"style":138},[511],{"type":37,"value":512},"      \"assertions\"",{"type":32,"tag":99,"props":514,"children":515},{"style":122},[516],{"type":37,"value":411},{"type":32,"tag":99,"props":518,"children":519},{"class":101,"line":260},[520,525,529,534,539,544,548,553],{"type":32,"tag":99,"props":521,"children":522},{"style":138},[523],{"type":37,"value":524},"        \"total-byte-weight\"",{"type":32,"tag":99,"props":526,"children":527},{"style":122},[528],{"type":37,"value":146},{"type":32,"tag":99,"props":530,"children":531},{"style":128},[532],{"type":37,"value":533},"\"error\"",{"type":32,"tag":99,"props":535,"children":536},{"style":122},[537],{"type":37,"value":538},", { ",{"type":32,"tag":99,"props":540,"children":541},{"style":138},[542],{"type":37,"value":543},"\"maxNumericValue\"",{"type":32,"tag":99,"props":545,"children":546},{"style":122},[547],{"type":37,"value":125},{"type":32,"tag":99,"props":549,"children":550},{"style":138},[551],{"type":37,"value":552},"512000",{"type":32,"tag":99,"props":554,"children":555},{"style":122},[556],{"type":37,"value":557}," }],\n",{"type":32,"tag":99,"props":559,"children":560},{"class":101,"line":282},[561,566,570,574,578,582,586,591],{"type":32,"tag":99,"props":562,"children":563},{"style":138},[564],{"type":37,"value":565},"        \"total-blocking-time\"",{"type":32,"tag":99,"props":567,"children":568},{"style":122},[569],{"type":37,"value":146},{"type":32,"tag":99,"props":571,"children":572},{"style":128},[573],{"type":37,"value":533},{"type":32,"tag":99,"props":575,"children":576},{"style":122},[577],{"type":37,"value":538},{"type":32,"tag":99,"props":579,"children":580},{"style":138},[581],{"type":37,"value":543},{"type":32,"tag":99,"props":583,"children":584},{"style":122},[585],{"type":37,"value":125},{"type":32,"tag":99,"props":587,"children":588},{"style":138},[589],{"type":37,"value":590},"200",{"type":32,"tag":99,"props":592,"children":593},{"style":122},[594],{"type":37,"value":557},{"type":32,"tag":99,"props":596,"children":597},{"class":101,"line":303},[598,603,607,611,615,619,623,628],{"type":32,"tag":99,"props":599,"children":600},{"style":138},[601],{"type":37,"value":602},"        \"largest-contentful-paint\"",{"type":32,"tag":99,"props":604,"children":605},{"style":122},[606],{"type":37,"value":146},{"type":32,"tag":99,"props":608,"children":609},{"style":128},[610],{"type":37,"value":533},{"type":32,"tag":99,"props":612,"children":613},{"style":122},[614],{"type":37,"value":538},{"type":32,"tag":99,"props":616,"children":617},{"style":138},[618],{"type":37,"value":543},{"type":32,"tag":99,"props":620,"children":621},{"style":122},[622],{"type":37,"value":125},{"type":32,"tag":99,"props":624,"children":625},{"style":138},[626],{"type":37,"value":627},"2500",{"type":32,"tag":99,"props":629,"children":630},{"style":122},[631],{"type":37,"value":557},{"type":32,"tag":99,"props":633,"children":634},{"class":101,"line":322},[635,640,644,648,652,656,660,665],{"type":32,"tag":99,"props":636,"children":637},{"style":138},[638],{"type":37,"value":639},"        \"cumulative-layout-shift\"",{"type":32,"tag":99,"props":641,"children":642},{"style":122},[643],{"type":37,"value":146},{"type":32,"tag":99,"props":645,"children":646},{"style":128},[647],{"type":37,"value":533},{"type":32,"tag":99,"props":649,"children":650},{"style":122},[651],{"type":37,"value":538},{"type":32,"tag":99,"props":653,"children":654},{"style":138},[655],{"type":37,"value":543},{"type":32,"tag":99,"props":657,"children":658},{"style":122},[659],{"type":37,"value":125},{"type":32,"tag":99,"props":661,"children":662},{"style":138},[663],{"type":37,"value":664},"0.1",{"type":32,"tag":99,"props":666,"children":667},{"style":122},[668],{"type":37,"value":557},{"type":32,"tag":99,"props":670,"children":671},{"class":101,"line":331},[672,677,681,685,689,694,698,703],{"type":32,"tag":99,"props":673,"children":674},{"style":138},[675],{"type":37,"value":676},"        \"categories:performance\"",{"type":32,"tag":99,"props":678,"children":679},{"style":122},[680],{"type":37,"value":146},{"type":32,"tag":99,"props":682,"children":683},{"style":128},[684],{"type":37,"value":533},{"type":32,"tag":99,"props":686,"children":687},{"style":122},[688],{"type":37,"value":538},{"type":32,"tag":99,"props":690,"children":691},{"style":138},[692],{"type":37,"value":693},"\"minScore\"",{"type":32,"tag":99,"props":695,"children":696},{"style":122},[697],{"type":37,"value":125},{"type":32,"tag":99,"props":699,"children":700},{"style":138},[701],{"type":37,"value":702},"0.85",{"type":32,"tag":99,"props":704,"children":705},{"style":122},[706],{"type":37,"value":707}," }]\n",{"type":32,"tag":99,"props":709,"children":710},{"class":101,"line":340},[711],{"type":32,"tag":99,"props":712,"children":713},{"style":122},[714],{"type":37,"value":715},"      }\n",{"type":32,"tag":99,"props":717,"children":718},{"class":101,"line":353},[719],{"type":32,"tag":99,"props":720,"children":721},{"style":122},[722],{"type":37,"value":470},{"type":32,"tag":99,"props":724,"children":726},{"class":101,"line":725},17,[727,732],{"type":32,"tag":99,"props":728,"children":729},{"style":138},[730],{"type":37,"value":731},"    \"upload\"",{"type":32,"tag":99,"props":733,"children":734},{"style":122},[735],{"type":37,"value":411},{"type":32,"tag":99,"props":737,"children":739},{"class":101,"line":738},18,[740,745,749],{"type":32,"tag":99,"props":741,"children":742},{"style":138},[743],{"type":37,"value":744},"      \"target\"",{"type":32,"tag":99,"props":746,"children":747},{"style":122},[748],{"type":37,"value":125},{"type":32,"tag":99,"props":750,"children":751},{"style":128},[752],{"type":37,"value":753},"\"temporary-public-storage\"\n",{"type":32,"tag":99,"props":755,"children":757},{"class":101,"line":756},19,[758],{"type":32,"tag":99,"props":759,"children":760},{"style":122},[761],{"type":37,"value":762},"    }\n",{"type":32,"tag":99,"props":764,"children":766},{"class":101,"line":765},20,[767],{"type":32,"tag":99,"props":768,"children":769},{"style":122},[770],{"type":37,"value":771},"  }\n",{"type":32,"tag":99,"props":773,"children":775},{"class":101,"line":774},21,[776],{"type":32,"tag":99,"props":777,"children":778},{"style":122},[779],{"type":37,"value":780},"}\n",{"type":32,"tag":33,"props":782,"children":783},{},[784,786,795],{"type":37,"value":785},"Avec cette configuration, si une PR ajoute 50 KB de JavaScript supplémentaire et que le TBT dépasse 200 ms, le CI échoue et la fusion est bloquée. Chez Roibase, en travaillant avec des clients qui passaient à l'",{"type":32,"tag":787,"props":788,"children":792},"a",{"href":789,"rel":790},"https:\u002F\u002Fwww.roibase.com.tr\u002Ffr\u002Fheadless",[791],"nofollow",[793],{"type":37,"value":794},"architecture Headless Commerce",{"type":37,"value":796},", nous avons utilisé cette approche pour réduire le TBT moyen de 2190 ms à 200 ms — chaque ajout de bibliothèque a été testé contre le budget.",{"type":32,"tag":798,"props":799,"children":801},"h3",{"id":800},"les-limites-de-lighthouse-ci-et-les-décisions-structurelles",[802],{"type":37,"value":803},"Les Limites de Lighthouse CI et les Décisions Structurelles",{"type":32,"tag":33,"props":805,"children":806},{},[807,809,814],{"type":37,"value":808},"Lighthouse CI effectue des tests synthétiques : une bande passante fixe (Moto G4, émulation 4G lent), un ralentissement CPU fixe (4x), une seule page. Un vrai utilisateur est sur un appareil différent, suit des chemins différents (page produit → panier → paiement), voit des variantes A\u002FB. C'est pourquoi vous devez positionner Lighthouse CI comme ",{"type":32,"tag":57,"props":810,"children":811},{},[812],{"type":37,"value":813},"la barre minimale",{"type":37,"value":815}," — si elle passe, c'est déployable, mais passer ne signifie pas 100 points en production. Pour mesurer la réalité production, vous avez besoin de RUM.",{"type":32,"tag":40,"props":817,"children":819},{"id":818},"rum-real-user-monitoring-transformer-la-réalité-production-en-données-décisionnelles",[820],{"type":37,"value":821},"RUM (Real User Monitoring) : Transformer la Réalité Production en Données Décisionnelles",{"type":32,"tag":33,"props":823,"children":824},{},[825],{"type":37,"value":826},"RUM recueille des métriques des vrais utilisateurs : Navigation Timing API, PerformanceObserver, CrUX (Chrome User Experience Report). Un vendeur les collecte (Speedcurve, Sentry Performance, Cloudflare Web Analytics) ou vous avez votre propre stack (web-vitals + BigQuery).",{"type":32,"tag":33,"props":828,"children":829},{},[830,832,838],{"type":37,"value":831},"Une intégration minimale avec ",{"type":32,"tag":95,"props":833,"children":835},{"className":834},[],[836],{"type":37,"value":837},"web-vitals",{"type":37,"value":839}," :",{"type":32,"tag":88,"props":841,"children":845},{"className":842,"code":843,"language":844,"meta":16,"style":16},"language-javascript shiki shiki-themes github-dark","\u002F\u002F app.js\nimport { onCLS, onFID, onLCP, onTTFB } from 'web-vitals';\n\nfunction sendToAnalytics(metric) {\n  const body = JSON.stringify({\n    name: metric.name,\n    value: metric.value,\n    id: metric.id,\n    navigationType: metric.navigationType,\n    page: window.location.pathname,\n    deviceType: \u002Fmobile\u002Fi.test(navigator.userAgent) ? 'mobile' : 'desktop'\n  });\n  \n  if (navigator.sendBeacon) {\n    navigator.sendBeacon('\u002Fapi\u002Fvitals', body);\n  } else {\n    fetch('\u002Fapi\u002Fvitals', { method: 'POST', body, keepalive: true });\n  }\n}\n\nonCLS(sendToAnalytics);\nonFID(sendToAnalytics);\nonLCP(sendToAnalytics);\nonTTFB(sendToAnalytics);\n","javascript",[846],{"type":32,"tag":95,"props":847,"children":848},{"__ignoreMap":16},[849,857,885,894,924,962,970,978,986,994,1002,1064,1072,1080,1093,1120,1138,1179,1186,1193,1200,1213,1226,1239],{"type":32,"tag":99,"props":850,"children":851},{"class":101,"line":102},[852],{"type":32,"tag":99,"props":853,"children":854},{"style":106},[855],{"type":37,"value":856},"\u002F\u002F app.js\n",{"type":32,"tag":99,"props":858,"children":859},{"class":101,"line":112},[860,865,870,875,880],{"type":32,"tag":99,"props":861,"children":862},{"style":316},[863],{"type":37,"value":864},"import",{"type":32,"tag":99,"props":866,"children":867},{"style":122},[868],{"type":37,"value":869}," { onCLS, onFID, onLCP, onTTFB } ",{"type":32,"tag":99,"props":871,"children":872},{"style":316},[873],{"type":37,"value":874},"from",{"type":32,"tag":99,"props":876,"children":877},{"style":128},[878],{"type":37,"value":879}," 'web-vitals'",{"type":32,"tag":99,"props":881,"children":882},{"style":122},[883],{"type":37,"value":884},";\n",{"type":32,"tag":99,"props":886,"children":887},{"class":101,"line":134},[888],{"type":32,"tag":99,"props":889,"children":891},{"emptyLinePlaceholder":890},true,[892],{"type":37,"value":893},"\n",{"type":32,"tag":99,"props":895,"children":896},{"class":101,"line":159},[897,902,908,913,919],{"type":32,"tag":99,"props":898,"children":899},{"style":316},[900],{"type":37,"value":901},"function",{"type":32,"tag":99,"props":903,"children":905},{"style":904},"--shiki-default:#B392F0",[906],{"type":37,"value":907}," sendToAnalytics",{"type":32,"tag":99,"props":909,"children":910},{"style":122},[911],{"type":37,"value":912},"(",{"type":32,"tag":99,"props":914,"children":916},{"style":915},"--shiki-default:#FFAB70",[917],{"type":37,"value":918},"metric",{"type":32,"tag":99,"props":920,"children":921},{"style":122},[922],{"type":37,"value":923},") {\n",{"type":32,"tag":99,"props":925,"children":926},{"class":101,"line":173},[927,932,937,942,947,952,957],{"type":32,"tag":99,"props":928,"children":929},{"style":316},[930],{"type":37,"value":931},"  const",{"type":32,"tag":99,"props":933,"children":934},{"style":138},[935],{"type":37,"value":936}," body",{"type":32,"tag":99,"props":938,"children":939},{"style":316},[940],{"type":37,"value":941}," =",{"type":32,"tag":99,"props":943,"children":944},{"style":138},[945],{"type":37,"value":946}," JSON",{"type":32,"tag":99,"props":948,"children":949},{"style":122},[950],{"type":37,"value":951},".",{"type":32,"tag":99,"props":953,"children":954},{"style":904},[955],{"type":37,"value":956},"stringify",{"type":32,"tag":99,"props":958,"children":959},{"style":122},[960],{"type":37,"value":961},"({\n",{"type":32,"tag":99,"props":963,"children":964},{"class":101,"line":186},[965],{"type":32,"tag":99,"props":966,"children":967},{"style":122},[968],{"type":37,"value":969},"    name: metric.name,\n",{"type":32,"tag":99,"props":971,"children":972},{"class":101,"line":204},[973],{"type":32,"tag":99,"props":974,"children":975},{"style":122},[976],{"type":37,"value":977},"    value: metric.value,\n",{"type":32,"tag":99,"props":979,"children":980},{"class":101,"line":217},[981],{"type":32,"tag":99,"props":982,"children":983},{"style":122},[984],{"type":37,"value":985},"    id: metric.id,\n",{"type":32,"tag":99,"props":987,"children":988},{"class":101,"line":26},[989],{"type":32,"tag":99,"props":990,"children":991},{"style":122},[992],{"type":37,"value":993},"    navigationType: metric.navigationType,\n",{"type":32,"tag":99,"props":995,"children":996},{"class":101,"line":260},[997],{"type":32,"tag":99,"props":998,"children":999},{"style":122},[1000],{"type":37,"value":1001},"    page: window.location.pathname,\n",{"type":32,"tag":99,"props":1003,"children":1004},{"class":101,"line":282},[1005,1010,1015,1021,1026,1031,1035,1040,1045,1050,1055,1059],{"type":32,"tag":99,"props":1006,"children":1007},{"style":122},[1008],{"type":37,"value":1009},"    deviceType:",{"type":32,"tag":99,"props":1011,"children":1012},{"style":128},[1013],{"type":37,"value":1014}," \u002F",{"type":32,"tag":99,"props":1016,"children":1018},{"style":1017},"--shiki-default:#DBEDFF",[1019],{"type":37,"value":1020},"mobile",{"type":32,"tag":99,"props":1022,"children":1023},{"style":128},[1024],{"type":37,"value":1025},"\u002F",{"type":32,"tag":99,"props":1027,"children":1028},{"style":316},[1029],{"type":37,"value":1030},"i",{"type":32,"tag":99,"props":1032,"children":1033},{"style":122},[1034],{"type":37,"value":951},{"type":32,"tag":99,"props":1036,"children":1037},{"style":904},[1038],{"type":37,"value":1039},"test",{"type":32,"tag":99,"props":1041,"children":1042},{"style":122},[1043],{"type":37,"value":1044},"(navigator.userAgent) ",{"type":32,"tag":99,"props":1046,"children":1047},{"style":316},[1048],{"type":37,"value":1049},"?",{"type":32,"tag":99,"props":1051,"children":1052},{"style":128},[1053],{"type":37,"value":1054}," 'mobile'",{"type":32,"tag":99,"props":1056,"children":1057},{"style":316},[1058],{"type":37,"value":839},{"type":32,"tag":99,"props":1060,"children":1061},{"style":128},[1062],{"type":37,"value":1063}," 'desktop'\n",{"type":32,"tag":99,"props":1065,"children":1066},{"class":101,"line":303},[1067],{"type":32,"tag":99,"props":1068,"children":1069},{"style":122},[1070],{"type":37,"value":1071},"  });\n",{"type":32,"tag":99,"props":1073,"children":1074},{"class":101,"line":322},[1075],{"type":32,"tag":99,"props":1076,"children":1077},{"style":122},[1078],{"type":37,"value":1079},"  \n",{"type":32,"tag":99,"props":1081,"children":1082},{"class":101,"line":331},[1083,1088],{"type":32,"tag":99,"props":1084,"children":1085},{"style":316},[1086],{"type":37,"value":1087},"  if",{"type":32,"tag":99,"props":1089,"children":1090},{"style":122},[1091],{"type":37,"value":1092}," (navigator.sendBeacon) {\n",{"type":32,"tag":99,"props":1094,"children":1095},{"class":101,"line":340},[1096,1101,1106,1110,1115],{"type":32,"tag":99,"props":1097,"children":1098},{"style":122},[1099],{"type":37,"value":1100},"    navigator.",{"type":32,"tag":99,"props":1102,"children":1103},{"style":904},[1104],{"type":37,"value":1105},"sendBeacon",{"type":32,"tag":99,"props":1107,"children":1108},{"style":122},[1109],{"type":37,"value":912},{"type":32,"tag":99,"props":1111,"children":1112},{"style":128},[1113],{"type":37,"value":1114},"'\u002Fapi\u002Fvitals'",{"type":32,"tag":99,"props":1116,"children":1117},{"style":122},[1118],{"type":37,"value":1119},", body);\n",{"type":32,"tag":99,"props":1121,"children":1122},{"class":101,"line":353},[1123,1128,1133],{"type":32,"tag":99,"props":1124,"children":1125},{"style":122},[1126],{"type":37,"value":1127},"  } ",{"type":32,"tag":99,"props":1129,"children":1130},{"style":316},[1131],{"type":37,"value":1132},"else",{"type":32,"tag":99,"props":1134,"children":1135},{"style":122},[1136],{"type":37,"value":1137}," {\n",{"type":32,"tag":99,"props":1139,"children":1140},{"class":101,"line":725},[1141,1146,1150,1154,1159,1164,1169,1174],{"type":32,"tag":99,"props":1142,"children":1143},{"style":904},[1144],{"type":37,"value":1145},"    fetch",{"type":32,"tag":99,"props":1147,"children":1148},{"style":122},[1149],{"type":37,"value":912},{"type":32,"tag":99,"props":1151,"children":1152},{"style":128},[1153],{"type":37,"value":1114},{"type":32,"tag":99,"props":1155,"children":1156},{"style":122},[1157],{"type":37,"value":1158},", { method: ",{"type":32,"tag":99,"props":1160,"children":1161},{"style":128},[1162],{"type":37,"value":1163},"'POST'",{"type":32,"tag":99,"props":1165,"children":1166},{"style":122},[1167],{"type":37,"value":1168},", body, keepalive: ",{"type":32,"tag":99,"props":1170,"children":1171},{"style":138},[1172],{"type":37,"value":1173},"true",{"type":32,"tag":99,"props":1175,"children":1176},{"style":122},[1177],{"type":37,"value":1178}," });\n",{"type":32,"tag":99,"props":1180,"children":1181},{"class":101,"line":738},[1182],{"type":32,"tag":99,"props":1183,"children":1184},{"style":122},[1185],{"type":37,"value":771},{"type":32,"tag":99,"props":1187,"children":1188},{"class":101,"line":756},[1189],{"type":32,"tag":99,"props":1190,"children":1191},{"style":122},[1192],{"type":37,"value":780},{"type":32,"tag":99,"props":1194,"children":1195},{"class":101,"line":765},[1196],{"type":32,"tag":99,"props":1197,"children":1198},{"emptyLinePlaceholder":890},[1199],{"type":37,"value":893},{"type":32,"tag":99,"props":1201,"children":1202},{"class":101,"line":774},[1203,1208],{"type":32,"tag":99,"props":1204,"children":1205},{"style":904},[1206],{"type":37,"value":1207},"onCLS",{"type":32,"tag":99,"props":1209,"children":1210},{"style":122},[1211],{"type":37,"value":1212},"(sendToAnalytics);\n",{"type":32,"tag":99,"props":1214,"children":1216},{"class":101,"line":1215},22,[1217,1222],{"type":32,"tag":99,"props":1218,"children":1219},{"style":904},[1220],{"type":37,"value":1221},"onFID",{"type":32,"tag":99,"props":1223,"children":1224},{"style":122},[1225],{"type":37,"value":1212},{"type":32,"tag":99,"props":1227,"children":1229},{"class":101,"line":1228},23,[1230,1235],{"type":32,"tag":99,"props":1231,"children":1232},{"style":904},[1233],{"type":37,"value":1234},"onLCP",{"type":32,"tag":99,"props":1236,"children":1237},{"style":122},[1238],{"type":37,"value":1212},{"type":32,"tag":99,"props":1240,"children":1242},{"class":101,"line":1241},24,[1243,1248],{"type":32,"tag":99,"props":1244,"children":1245},{"style":904},[1246],{"type":37,"value":1247},"onTTFB",{"type":32,"tag":99,"props":1249,"children":1250},{"style":122},[1251],{"type":37,"value":1212},{"type":32,"tag":33,"props":1253,"children":1254},{},[1255],{"type":37,"value":1256},"Téléchargez ces données dans BigQuery, puis combinez-les avec vos données d'attribution marketing à l'aide de dbt :",{"type":32,"tag":88,"props":1258,"children":1262},{"className":1259,"code":1260,"language":1261,"meta":16,"style":16},"language-sql shiki shiki-themes github-dark","-- models\u002Fperformance_impact.sql\nWITH vitals AS (\n  SELECT\n    session_id,\n    AVG(CASE WHEN metric_name = 'LCP' THEN value END) AS avg_lcp,\n    AVG(CASE WHEN metric_name = 'CLS' THEN value END) AS avg_cls\n  FROM {{ ref('raw_vitals') }}\n  GROUP BY session_id\n),\nconversions AS (\n  SELECT session_id, revenue, converted\n  FROM {{ ref('ga4_sessions') }}\n)\nSELECT\n  CASE\n    WHEN v.avg_lcp \u003C= 2500 THEN 'good'\n    WHEN v.avg_lcp \u003C= 4000 THEN 'needs_improvement'\n    ELSE 'poor'\n  END AS lcp_band,\n  COUNT(*) AS sessions,\n  SUM(c.converted) AS conversions,\n  SAFE_DIVIDE(SUM(c.converted), COUNT(*)) AS cvr\nFROM vitals v\nLEFT JOIN conversions c USING(session_id)\nGROUP BY lcp_band;\n","sql",[1263],{"type":32,"tag":95,"props":1264,"children":1265},{"__ignoreMap":16},[1266,1274,1297,1305,1313,1379,1436,1459,1472,1480,1496,1509,1529,1537,1545,1553,1594,1631,1644,1662,1696,1735,1796,1809,1832],{"type":32,"tag":99,"props":1267,"children":1268},{"class":101,"line":102},[1269],{"type":32,"tag":99,"props":1270,"children":1271},{"style":106},[1272],{"type":37,"value":1273},"-- models\u002Fperformance_impact.sql\n",{"type":32,"tag":99,"props":1275,"children":1276},{"class":101,"line":112},[1277,1282,1287,1292],{"type":32,"tag":99,"props":1278,"children":1279},{"style":316},[1280],{"type":37,"value":1281},"WITH",{"type":32,"tag":99,"props":1283,"children":1284},{"style":122},[1285],{"type":37,"value":1286}," vitals ",{"type":32,"tag":99,"props":1288,"children":1289},{"style":316},[1290],{"type":37,"value":1291},"AS",{"type":32,"tag":99,"props":1293,"children":1294},{"style":122},[1295],{"type":37,"value":1296}," (\n",{"type":32,"tag":99,"props":1298,"children":1299},{"class":101,"line":134},[1300],{"type":32,"tag":99,"props":1301,"children":1302},{"style":316},[1303],{"type":37,"value":1304},"  SELECT\n",{"type":32,"tag":99,"props":1306,"children":1307},{"class":101,"line":159},[1308],{"type":32,"tag":99,"props":1309,"children":1310},{"style":122},[1311],{"type":37,"value":1312},"    session_id,\n",{"type":32,"tag":99,"props":1314,"children":1315},{"class":101,"line":173},[1316,1321,1325,1330,1335,1340,1345,1350,1355,1360,1365,1370,1374],{"type":32,"tag":99,"props":1317,"children":1318},{"style":138},[1319],{"type":37,"value":1320},"    AVG",{"type":32,"tag":99,"props":1322,"children":1323},{"style":122},[1324],{"type":37,"value":912},{"type":32,"tag":99,"props":1326,"children":1327},{"style":316},[1328],{"type":37,"value":1329},"CASE",{"type":32,"tag":99,"props":1331,"children":1332},{"style":316},[1333],{"type":37,"value":1334}," WHEN",{"type":32,"tag":99,"props":1336,"children":1337},{"style":122},[1338],{"type":37,"value":1339}," metric_name ",{"type":32,"tag":99,"props":1341,"children":1342},{"style":316},[1343],{"type":37,"value":1344},"=",{"type":32,"tag":99,"props":1346,"children":1347},{"style":128},[1348],{"type":37,"value":1349}," 'LCP'",{"type":32,"tag":99,"props":1351,"children":1352},{"style":316},[1353],{"type":37,"value":1354}," THEN",{"type":32,"tag":99,"props":1356,"children":1357},{"style":316},[1358],{"type":37,"value":1359}," value",{"type":32,"tag":99,"props":1361,"children":1362},{"style":316},[1363],{"type":37,"value":1364}," END",{"type":32,"tag":99,"props":1366,"children":1367},{"style":122},[1368],{"type":37,"value":1369},") ",{"type":32,"tag":99,"props":1371,"children":1372},{"style":316},[1373],{"type":37,"value":1291},{"type":32,"tag":99,"props":1375,"children":1376},{"style":122},[1377],{"type":37,"value":1378}," avg_lcp,\n",{"type":32,"tag":99,"props":1380,"children":1381},{"class":101,"line":186},[1382,1386,1390,1394,1398,1402,1406,1411,1415,1419,1423,1427,1431],{"type":32,"tag":99,"props":1383,"children":1384},{"style":138},[1385],{"type":37,"value":1320},{"type":32,"tag":99,"props":1387,"children":1388},{"style":122},[1389],{"type":37,"value":912},{"type":32,"tag":99,"props":1391,"children":1392},{"style":316},[1393],{"type":37,"value":1329},{"type":32,"tag":99,"props":1395,"children":1396},{"style":316},[1397],{"type":37,"value":1334},{"type":32,"tag":99,"props":1399,"children":1400},{"style":122},[1401],{"type":37,"value":1339},{"type":32,"tag":99,"props":1403,"children":1404},{"style":316},[1405],{"type":37,"value":1344},{"type":32,"tag":99,"props":1407,"children":1408},{"style":128},[1409],{"type":37,"value":1410}," 'CLS'",{"type":32,"tag":99,"props":1412,"children":1413},{"style":316},[1414],{"type":37,"value":1354},{"type":32,"tag":99,"props":1416,"children":1417},{"style":316},[1418],{"type":37,"value":1359},{"type":32,"tag":99,"props":1420,"children":1421},{"style":316},[1422],{"type":37,"value":1364},{"type":32,"tag":99,"props":1424,"children":1425},{"style":122},[1426],{"type":37,"value":1369},{"type":32,"tag":99,"props":1428,"children":1429},{"style":316},[1430],{"type":37,"value":1291},{"type":32,"tag":99,"props":1432,"children":1433},{"style":122},[1434],{"type":37,"value":1435}," avg_cls\n",{"type":32,"tag":99,"props":1437,"children":1438},{"class":101,"line":204},[1439,1444,1449,1454],{"type":32,"tag":99,"props":1440,"children":1441},{"style":316},[1442],{"type":37,"value":1443},"  FROM",{"type":32,"tag":99,"props":1445,"children":1446},{"style":122},[1447],{"type":37,"value":1448}," {{ ref(",{"type":32,"tag":99,"props":1450,"children":1451},{"style":128},[1452],{"type":37,"value":1453},"'raw_vitals'",{"type":32,"tag":99,"props":1455,"children":1456},{"style":122},[1457],{"type":37,"value":1458},") }}\n",{"type":32,"tag":99,"props":1460,"children":1461},{"class":101,"line":217},[1462,1467],{"type":32,"tag":99,"props":1463,"children":1464},{"style":316},[1465],{"type":37,"value":1466},"  GROUP BY",{"type":32,"tag":99,"props":1468,"children":1469},{"style":122},[1470],{"type":37,"value":1471}," session_id\n",{"type":32,"tag":99,"props":1473,"children":1474},{"class":101,"line":26},[1475],{"type":32,"tag":99,"props":1476,"children":1477},{"style":122},[1478],{"type":37,"value":1479},"),\n",{"type":32,"tag":99,"props":1481,"children":1482},{"class":101,"line":260},[1483,1488,1492],{"type":32,"tag":99,"props":1484,"children":1485},{"style":122},[1486],{"type":37,"value":1487},"conversions ",{"type":32,"tag":99,"props":1489,"children":1490},{"style":316},[1491],{"type":37,"value":1291},{"type":32,"tag":99,"props":1493,"children":1494},{"style":122},[1495],{"type":37,"value":1296},{"type":32,"tag":99,"props":1497,"children":1498},{"class":101,"line":282},[1499,1504],{"type":32,"tag":99,"props":1500,"children":1501},{"style":316},[1502],{"type":37,"value":1503},"  SELECT",{"type":32,"tag":99,"props":1505,"children":1506},{"style":122},[1507],{"type":37,"value":1508}," session_id, revenue, converted\n",{"type":32,"tag":99,"props":1510,"children":1511},{"class":101,"line":303},[1512,1516,1520,1525],{"type":32,"tag":99,"props":1513,"children":1514},{"style":316},[1515],{"type":37,"value":1443},{"type":32,"tag":99,"props":1517,"children":1518},{"style":122},[1519],{"type":37,"value":1448},{"type":32,"tag":99,"props":1521,"children":1522},{"style":128},[1523],{"type":37,"value":1524},"'ga4_sessions'",{"type":32,"tag":99,"props":1526,"children":1527},{"style":122},[1528],{"type":37,"value":1458},{"type":32,"tag":99,"props":1530,"children":1531},{"class":101,"line":322},[1532],{"type":32,"tag":99,"props":1533,"children":1534},{"style":122},[1535],{"type":37,"value":1536},")\n",{"type":32,"tag":99,"props":1538,"children":1539},{"class":101,"line":331},[1540],{"type":32,"tag":99,"props":1541,"children":1542},{"style":316},[1543],{"type":37,"value":1544},"SELECT\n",{"type":32,"tag":99,"props":1546,"children":1547},{"class":101,"line":340},[1548],{"type":32,"tag":99,"props":1549,"children":1550},{"style":316},[1551],{"type":37,"value":1552},"  CASE\n",{"type":32,"tag":99,"props":1554,"children":1555},{"class":101,"line":353},[1556,1561,1566,1570,1575,1580,1585,1589],{"type":32,"tag":99,"props":1557,"children":1558},{"style":316},[1559],{"type":37,"value":1560},"    WHEN",{"type":32,"tag":99,"props":1562,"children":1563},{"style":138},[1564],{"type":37,"value":1565}," v",{"type":32,"tag":99,"props":1567,"children":1568},{"style":122},[1569],{"type":37,"value":951},{"type":32,"tag":99,"props":1571,"children":1572},{"style":138},[1573],{"type":37,"value":1574},"avg_lcp",{"type":32,"tag":99,"props":1576,"children":1577},{"style":316},[1578],{"type":37,"value":1579}," \u003C=",{"type":32,"tag":99,"props":1581,"children":1582},{"style":138},[1583],{"type":37,"value":1584}," 2500",{"type":32,"tag":99,"props":1586,"children":1587},{"style":316},[1588],{"type":37,"value":1354},{"type":32,"tag":99,"props":1590,"children":1591},{"style":128},[1592],{"type":37,"value":1593}," 'good'\n",{"type":32,"tag":99,"props":1595,"children":1596},{"class":101,"line":725},[1597,1601,1605,1609,1613,1617,1622,1626],{"type":32,"tag":99,"props":1598,"children":1599},{"style":316},[1600],{"type":37,"value":1560},{"type":32,"tag":99,"props":1602,"children":1603},{"style":138},[1604],{"type":37,"value":1565},{"type":32,"tag":99,"props":1606,"children":1607},{"style":122},[1608],{"type":37,"value":951},{"type":32,"tag":99,"props":1610,"children":1611},{"style":138},[1612],{"type":37,"value":1574},{"type":32,"tag":99,"props":1614,"children":1615},{"style":316},[1616],{"type":37,"value":1579},{"type":32,"tag":99,"props":1618,"children":1619},{"style":138},[1620],{"type":37,"value":1621}," 4000",{"type":32,"tag":99,"props":1623,"children":1624},{"style":316},[1625],{"type":37,"value":1354},{"type":32,"tag":99,"props":1627,"children":1628},{"style":128},[1629],{"type":37,"value":1630}," 'needs_improvement'\n",{"type":32,"tag":99,"props":1632,"children":1633},{"class":101,"line":738},[1634,1639],{"type":32,"tag":99,"props":1635,"children":1636},{"style":316},[1637],{"type":37,"value":1638},"    ELSE",{"type":32,"tag":99,"props":1640,"children":1641},{"style":128},[1642],{"type":37,"value":1643}," 'poor'\n",{"type":32,"tag":99,"props":1645,"children":1646},{"class":101,"line":756},[1647,1652,1657],{"type":32,"tag":99,"props":1648,"children":1649},{"style":316},[1650],{"type":37,"value":1651},"  END",{"type":32,"tag":99,"props":1653,"children":1654},{"style":316},[1655],{"type":37,"value":1656}," AS",{"type":32,"tag":99,"props":1658,"children":1659},{"style":122},[1660],{"type":37,"value":1661}," lcp_band,\n",{"type":32,"tag":99,"props":1663,"children":1664},{"class":101,"line":765},[1665,1670,1674,1679,1683,1687,1692],{"type":32,"tag":99,"props":1666,"children":1667},{"style":138},[1668],{"type":37,"value":1669},"  COUNT",{"type":32,"tag":99,"props":1671,"children":1672},{"style":122},[1673],{"type":37,"value":912},{"type":32,"tag":99,"props":1675,"children":1676},{"style":316},[1677],{"type":37,"value":1678},"*",{"type":32,"tag":99,"props":1680,"children":1681},{"style":122},[1682],{"type":37,"value":1369},{"type":32,"tag":99,"props":1684,"children":1685},{"style":316},[1686],{"type":37,"value":1291},{"type":32,"tag":99,"props":1688,"children":1689},{"style":316},[1690],{"type":37,"value":1691}," sessions",{"type":32,"tag":99,"props":1693,"children":1694},{"style":122},[1695],{"type":37,"value":504},{"type":32,"tag":99,"props":1697,"children":1698},{"class":101,"line":774},[1699,1704,1708,1713,1717,1722,1726,1730],{"type":32,"tag":99,"props":1700,"children":1701},{"style":138},[1702],{"type":37,"value":1703},"  SUM",{"type":32,"tag":99,"props":1705,"children":1706},{"style":122},[1707],{"type":37,"value":912},{"type":32,"tag":99,"props":1709,"children":1710},{"style":138},[1711],{"type":37,"value":1712},"c",{"type":32,"tag":99,"props":1714,"children":1715},{"style":122},[1716],{"type":37,"value":951},{"type":32,"tag":99,"props":1718,"children":1719},{"style":138},[1720],{"type":37,"value":1721},"converted",{"type":32,"tag":99,"props":1723,"children":1724},{"style":122},[1725],{"type":37,"value":1369},{"type":32,"tag":99,"props":1727,"children":1728},{"style":316},[1729],{"type":37,"value":1291},{"type":32,"tag":99,"props":1731,"children":1732},{"style":122},[1733],{"type":37,"value":1734}," conversions,\n",{"type":32,"tag":99,"props":1736,"children":1737},{"class":101,"line":1215},[1738,1743,1748,1752,1756,1760,1764,1769,1774,1778,1782,1787,1791],{"type":32,"tag":99,"props":1739,"children":1740},{"style":122},[1741],{"type":37,"value":1742},"  SAFE_DIVIDE(",{"type":32,"tag":99,"props":1744,"children":1745},{"style":138},[1746],{"type":37,"value":1747},"SUM",{"type":32,"tag":99,"props":1749,"children":1750},{"style":122},[1751],{"type":37,"value":912},{"type":32,"tag":99,"props":1753,"children":1754},{"style":138},[1755],{"type":37,"value":1712},{"type":32,"tag":99,"props":1757,"children":1758},{"style":122},[1759],{"type":37,"value":951},{"type":32,"tag":99,"props":1761,"children":1762},{"style":138},[1763],{"type":37,"value":1721},{"type":32,"tag":99,"props":1765,"children":1766},{"style":122},[1767],{"type":37,"value":1768},"), ",{"type":32,"tag":99,"props":1770,"children":1771},{"style":138},[1772],{"type":37,"value":1773},"COUNT",{"type":32,"tag":99,"props":1775,"children":1776},{"style":122},[1777],{"type":37,"value":912},{"type":32,"tag":99,"props":1779,"children":1780},{"style":316},[1781],{"type":37,"value":1678},{"type":32,"tag":99,"props":1783,"children":1784},{"style":122},[1785],{"type":37,"value":1786},")) ",{"type":32,"tag":99,"props":1788,"children":1789},{"style":316},[1790],{"type":37,"value":1291},{"type":32,"tag":99,"props":1792,"children":1793},{"style":122},[1794],{"type":37,"value":1795}," cvr\n",{"type":32,"tag":99,"props":1797,"children":1798},{"class":101,"line":1228},[1799,1804],{"type":32,"tag":99,"props":1800,"children":1801},{"style":316},[1802],{"type":37,"value":1803},"FROM",{"type":32,"tag":99,"props":1805,"children":1806},{"style":122},[1807],{"type":37,"value":1808}," vitals v\n",{"type":32,"tag":99,"props":1810,"children":1811},{"class":101,"line":1241},[1812,1817,1822,1827],{"type":32,"tag":99,"props":1813,"children":1814},{"style":316},[1815],{"type":37,"value":1816},"LEFT JOIN",{"type":32,"tag":99,"props":1818,"children":1819},{"style":122},[1820],{"type":37,"value":1821}," conversions c ",{"type":32,"tag":99,"props":1823,"children":1824},{"style":316},[1825],{"type":37,"value":1826},"USING",{"type":32,"tag":99,"props":1828,"children":1829},{"style":122},[1830],{"type":37,"value":1831},"(session_id)\n",{"type":32,"tag":99,"props":1833,"children":1835},{"class":101,"line":1834},25,[1836,1841],{"type":32,"tag":99,"props":1837,"children":1838},{"style":316},[1839],{"type":37,"value":1840},"GROUP BY",{"type":32,"tag":99,"props":1842,"children":1843},{"style":122},[1844],{"type":37,"value":1845}," lcp_band;\n",{"type":32,"tag":33,"props":1847,"children":1848},{},[1849],{"type":37,"value":1850},"Ce tableau vous donne une donnée concrète : « LCP sous 2,5 secondes = CVR 3,4 %, au-dessus = CVR 2,1 % ». Quand vous rapportez ce point au CMO, la demande abstraite « optimisons la performance » devient concrète : « réduire LCP à moins de 2,5 s = revenus supplémentaires de 18K$ par mois ».",{"type":32,"tag":40,"props":1852,"children":1854},{"id":1853},"lier-les-alertes-de-régression-à-lintégration-slackpagerduty",[1855],{"type":37,"value":1856},"Lier les Alertes de Régression à l'Intégration Slack\u002FPagerDuty",{"type":32,"tag":33,"props":1858,"children":1859},{},[1860],{"type":37,"value":1861},"Une fois que vous collectez les données RUM, vous devez détecter les régressions avec des alertes de seuil. Si votre moyenne sur 7 jours est LCP 2,2 secondes mais qu'aujourd'hui elle est montée à 3,1 secondes, c'est une régression de déploiement ou un problème CDN. Ne détectez pas cela via un dashboard manuel — automatisez-le.",{"type":32,"tag":798,"props":1863,"children":1865},{"id":1864},"alerting-basé-sur-les-métriques-avec-datadog",[1866],{"type":37,"value":1867},"Alerting Basé sur les Métriques avec DataDog",{"type":32,"tag":33,"props":1869,"children":1870},{},[1871],{"type":37,"value":1872},"DataDog parse automatiquement les métriques RUM et détecte les anomalies. Définissez un monitor :",{"type":32,"tag":88,"props":1874,"children":1876},{"className":384,"code":1875,"language":386,"meta":16,"style":16},"{\n  \"name\": \"LCP Regression - Desktop\",\n  \"type\": \"metric alert\",\n  \"query\": \"avg(last_1h):avg:rum.largest_contentful_paint{device:desktop} > 2500\",\n  \"message\": \"LCP desktop a dépassé 2500ms dans la dernière heure. Dernier déploiement : {{deploy.id}}. @slack-perf-alerts @pagerduty\",\n  \"tags\": [\"service:ecommerce\", \"env:production\"],\n  \"thresholds\": {\n    \"critical\": 2500,\n    \"warning\": 2200\n  }\n}\n",[1877],{"type":32,"tag":95,"props":1878,"children":1879},{"__ignoreMap":16},[1880,1887,1908,1929,1950,1971,2002,2014,2034,2051,2058],{"type":32,"tag":99,"props":1881,"children":1882},{"class":101,"line":102},[1883],{"type":32,"tag":99,"props":1884,"children":1885},{"style":122},[1886],{"type":37,"value":398},{"type":32,"tag":99,"props":1888,"children":1889},{"class":101,"line":112},[1890,1895,1899,1904],{"type":32,"tag":99,"props":1891,"children":1892},{"style":138},[1893],{"type":37,"value":1894},"  \"name\"",{"type":32,"tag":99,"props":1896,"children":1897},{"style":122},[1898],{"type":37,"value":125},{"type":32,"tag":99,"props":1900,"children":1901},{"style":128},[1902],{"type":37,"value":1903},"\"LCP Regression - Desktop\"",{"type":32,"tag":99,"props":1905,"children":1906},{"style":122},[1907],{"type":37,"value":504},{"type":32,"tag":99,"props":1909,"children":1910},{"class":101,"line":134},[1911,1916,1920,1925],{"type":32,"tag":99,"props":1912,"children":1913},{"style":138},[1914],{"type":37,"value":1915},"  \"type\"",{"type":32,"tag":99,"props":1917,"children":1918},{"style":122},[1919],{"type":37,"value":125},{"type":32,"tag":99,"props":1921,"children":1922},{"style":128},[1923],{"type":37,"value":1924},"\"metric alert\"",{"type":32,"tag":99,"props":1926,"children":1927},{"style":122},[1928],{"type":37,"value":504},{"type":32,"tag":99,"props":1930,"children":1931},{"class":101,"line":159},[1932,1937,1941,1946],{"type":32,"tag":99,"props":1933,"children":1934},{"style":138},[1935],{"type":37,"value":1936},"  \"query\"",{"type":32,"tag":99,"props":1938,"children":1939},{"style":122},[1940],{"type":37,"value":125},{"type":32,"tag":99,"props":1942,"children":1943},{"style":128},[1944],{"type":37,"value":1945},"\"avg(last_1h):avg:rum.largest_contentful_paint{device:desktop} > 2500\"",{"type":32,"tag":99,"props":1947,"children":1948},{"style":122},[1949],{"type":37,"value":504},{"type":32,"tag":99,"props":1951,"children":1952},{"class":101,"line":173},[1953,1958,1962,1967],{"type":32,"tag":99,"props":1954,"children":1955},{"style":138},[1956],{"type":37,"value":1957},"  \"message\"",{"type":32,"tag":99,"props":1959,"children":1960},{"style":122},[1961],{"type":37,"value":125},{"type":32,"tag":99,"props":1963,"children":1964},{"style":128},[1965],{"type":37,"value":1966},"\"LCP desktop a dépassé 2500ms dans la dernière heure. Dernier déploiement : {{deploy.id}}. @slack-perf-alerts @pagerduty\"",{"type":32,"tag":99,"props":1968,"children":1969},{"style":122},[1970],{"type":37,"value":504},{"type":32,"tag":99,"props":1972,"children":1973},{"class":101,"line":186},[1974,1979,1983,1988,1993,1998],{"type":32,"tag":99,"props":1975,"children":1976},{"style":138},[1977],{"type":37,"value":1978},"  \"tags\"",{"type":32,"tag":99,"props":1980,"children":1981},{"style":122},[1982],{"type":37,"value":146},{"type":32,"tag":99,"props":1984,"children":1985},{"style":128},[1986],{"type":37,"value":1987},"\"service:ecommerce\"",{"type":32,"tag":99,"props":1989,"children":1990},{"style":122},[1991],{"type":37,"value":1992},", ",{"type":32,"tag":99,"props":1994,"children":1995},{"style":128},[1996],{"type":37,"value":1997},"\"env:production\"",{"type":32,"tag":99,"props":1999,"children":2000},{"style":122},[2001],{"type":37,"value":445},{"type":32,"tag":99,"props":2003,"children":2004},{"class":101,"line":204},[2005,2010],{"type":32,"tag":99,"props":2006,"children":2007},{"style":138},[2008],{"type":37,"value":2009},"  \"thresholds\"",{"type":32,"tag":99,"props":2011,"children":2012},{"style":122},[2013],{"type":37,"value":411},{"type":32,"tag":99,"props":2015,"children":2016},{"class":101,"line":217},[2017,2022,2026,2030],{"type":32,"tag":99,"props":2018,"children":2019},{"style":138},[2020],{"type":37,"value":2021},"    \"critical\"",{"type":32,"tag":99,"props":2023,"children":2024},{"style":122},[2025],{"type":37,"value":125},{"type":32,"tag":99,"props":2027,"children":2028},{"style":138},[2029],{"type":37,"value":627},{"type":32,"tag":99,"props":2031,"children":2032},{"style":122},[2033],{"type":37,"value":504},{"type":32,"tag":99,"props":2035,"children":2036},{"class":101,"line":26},[2037,2042,2046],{"type":32,"tag":99,"props":2038,"children":2039},{"style":138},[2040],{"type":37,"value":2041},"    \"warning\"",{"type":32,"tag":99,"props":2043,"children":2044},{"style":122},[2045],{"type":37,"value":125},{"type":32,"tag":99,"props":2047,"children":2048},{"style":138},[2049],{"type":37,"value":2050},"2200\n",{"type":32,"tag":99,"props":2052,"children":2053},{"class":101,"line":260},[2054],{"type":32,"tag":99,"props":2055,"children":2056},{"style":122},[2057],{"type":37,"value":771},{"type":32,"tag":99,"props":2059,"children":2060},{"class":101,"line":282},[2061],{"type":32,"tag":99,"props":2062,"children":2063},{"style":122},[2064],{"type":37,"value":780},{"type":32,"tag":33,"props":2066,"children":2067},{},[2068],{"type":37,"value":2069},"Quand cette alerte se déclenche, elle tombe dans un canal Slack, ouvre un incident PagerDuty, et réveille le développeur de garde. Si le message d'alerte inclut un ID de déploiement (provenant de votre tag CI), vous trouvez le commit responsable en 30 secondes.",{"type":32,"tag":798,"props":2071,"children":2073},{"id":2072},"rediriger-les-échecs-de-seuil-lighthouse-ci-vers-des-alertes",[2074],{"type":37,"value":2075},"Rediriger les Échecs de Seuil Lighthouse CI vers des Alertes",{"type":32,"tag":33,"props":2077,"children":2078},{},[2079],{"type":37,"value":2080},"Certaines équipes ne laissent pas le Lighthouse CI fail juste bloquer les PR — elles l'envoient aussi à Slack :",{"type":32,"tag":88,"props":2082,"children":2084},{"className":90,"code":2083,"language":92,"meta":16,"style":16},"# .github\u002Fworkflows\u002Flighthouse-ci.yml (étape supplémentaire)\n- name: Notify Slack on Failure\n  if: failure()\n  uses: slackapi\u002Fslack-github-action@v1\n  with:\n    payload: |\n      {\n        \"text\": \"Lighthouse CI FAILED on PR #${{ github.event.pull_request.number }}\",\n        \"blocks\": [\n          {\n            \"type\": \"section\",\n            \"text\": {\n              \"type\": \"mrkdwn\",\n              \"text\": \"*Performance budget exceeded*\\nPR: \u003C${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }}>\\nBranch: `${{ github.head_ref }}`\"\n            }\n          }\n        ]\n      }\n  env:\n    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_PERF }}\n",[2085],{"type":32,"tag":95,"props":2086,"children":2087},{"__ignoreMap":16},[2088,2096,2117,2133,2150,2162,2178,2186,2194,2202,2210,2218,2226,2234,2242,2250,2258,2266,2273,2285],{"type":32,"tag":99,"props":2089,"children":2090},{"class":101,"line":102},[2091],{"type":32,"tag":99,"props":2092,"children":2093},{"style":106},[2094],{"type":37,"value":2095},"# .github\u002Fworkflows\u002Flighthouse-ci.yml (étape supplémentaire)\n",{"type":32,"tag":99,"props":2097,"children":2098},{"class":101,"line":112},[2099,2104,2108,2112],{"type":32,"tag":99,"props":2100,"children":2101},{"style":122},[2102],{"type":37,"value":2103},"- ",{"type":32,"tag":99,"props":2105,"children":2106},{"style":116},[2107],{"type":37,"value":119},{"type":32,"tag":99,"props":2109,"children":2110},{"style":122},[2111],{"type":37,"value":125},{"type":32,"tag":99,"props":2113,"children":2114},{"style":128},[2115],{"type":37,"value":2116},"Notify Slack on Failure\n",{"type":32,"tag":99,"props":2118,"children":2119},{"class":101,"line":134},[2120,2124,2128],{"type":32,"tag":99,"props":2121,"children":2122},{"style":116},[2123],{"type":37,"value":1087},{"type":32,"tag":99,"props":2125,"children":2126},{"style":122},[2127],{"type":37,"value":125},{"type":32,"tag":99,"props":2129,"children":2130},{"style":128},[2131],{"type":37,"value":2132},"failure()\n",{"type":32,"tag":99,"props":2134,"children":2135},{"class":101,"line":159},[2136,2141,2145],{"type":32,"tag":99,"props":2137,"children":2138},{"style":116},[2139],{"type":37,"value":2140},"  uses",{"type":32,"tag":99,"props":2142,"children":2143},{"style":122},[2144],{"type":37,"value":125},{"type":32,"tag":99,"props":2146,"children":2147},{"style":128},[2148],{"type":37,"value":2149},"slackapi\u002Fslack-github-action@v1\n",{"type":32,"tag":99,"props":2151,"children":2152},{"class":101,"line":173},[2153,2158],{"type":32,"tag":99,"props":2154,"children":2155},{"style":116},[2156],{"type":37,"value":2157},"  with",{"type":32,"tag":99,"props":2159,"children":2160},{"style":122},[2161],{"type":37,"value":170},{"type":32,"tag":99,"props":2163,"children":2164},{"class":101,"line":186},[2165,2170,2174],{"type":32,"tag":99,"props":2166,"children":2167},{"style":116},[2168],{"type":37,"value":2169},"    payload",{"type":32,"tag":99,"props":2171,"children":2172},{"style":122},[2173],{"type":37,"value":125},{"type":32,"tag":99,"props":2175,"children":2176},{"style":316},[2177],{"type":37,"value":319},{"type":32,"tag":99,"props":2179,"children":2180},{"class":101,"line":204},[2181],{"type":32,"tag":99,"props":2182,"children":2183},{"style":128},[2184],{"type":37,"value":2185},"      {\n",{"type":32,"tag":99,"props":2187,"children":2188},{"class":101,"line":217},[2189],{"type":32,"tag":99,"props":2190,"children":2191},{"style":128},[2192],{"type":37,"value":2193},"        \"text\": \"Lighthouse CI FAILED on PR #${{ github.event.pull_request.number }}\",\n",{"type":32,"tag":99,"props":2195,"children":2196},{"class":101,"line":26},[2197],{"type":32,"tag":99,"props":2198,"children":2199},{"style":128},[2200],{"type":37,"value":2201},"        \"blocks\": [\n",{"type":32,"tag":99,"props":2203,"children":2204},{"class":101,"line":260},[2205],{"type":32,"tag":99,"props":2206,"children":2207},{"style":128},[2208],{"type":37,"value":2209},"          {\n",{"type":32,"tag":99,"props":2211,"children":2212},{"class":101,"line":282},[2213],{"type":32,"tag":99,"props":2214,"children":2215},{"style":128},[2216],{"type":37,"value":2217},"            \"type\": \"section\",\n",{"type":32,"tag":99,"props":2219,"children":2220},{"class":101,"line":303},[2221],{"type":32,"tag":99,"props":2222,"children":2223},{"style":128},[2224],{"type":37,"value":2225},"            \"text\": {\n",{"type":32,"tag":99,"props":2227,"children":2228},{"class":101,"line":322},[2229],{"type":32,"tag":99,"props":2230,"children":2231},{"style":128},[2232],{"type":37,"value":2233},"              \"type\": \"mrkdwn\",\n",{"type":32,"tag":99,"props":2235,"children":2236},{"class":101,"line":331},[2237],{"type":32,"tag":99,"props":2238,"children":2239},{"style":128},[2240],{"type":37,"value":2241},"              \"text\": \"*Performance budget exceeded*\\nPR: \u003C${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }}>\\nBranch: `${{ github.head_ref }}`\"\n",{"type":32,"tag":99,"props":2243,"children":2244},{"class":101,"line":340},[2245],{"type":32,"tag":99,"props":2246,"children":2247},{"style":128},[2248],{"type":37,"value":2249},"            }\n",{"type":32,"tag":99,"props":2251,"children":2252},{"class":101,"line":353},[2253],{"type":32,"tag":99,"props":2254,"children":2255},{"style":128},[2256],{"type":37,"value":2257},"          }\n",{"type":32,"tag":99,"props":2259,"children":2260},{"class":101,"line":725},[2261],{"type":32,"tag":99,"props":2262,"children":2263},{"style":128},[2264],{"type":37,"value":2265},"        ]\n",{"type":32,"tag":99,"props":2267,"children":2268},{"class":101,"line":738},[2269],{"type":32,"tag":99,"props":2270,"children":2271},{"style":128},[2272],{"type":37,"value":715},{"type":32,"tag":99,"props":2274,"children":2275},{"class":101,"line":756},[2276,2281],{"type":32,"tag":99,"props":2277,"children":2278},{"style":116},[2279],{"type":37,"value":2280},"  env",{"type":32,"tag":99,"props":2282,"children":2283},{"style":122},[2284],{"type":37,"value":170},{"type":32,"tag":99,"props":2286,"children":2287},{"class":101,"line":765},[2288,2293,2297],{"type":32,"tag":99,"props":2289,"children":2290},{"style":116},[2291],{"type":37,"value":2292},"    SLACK_WEBHOOK_URL",{"type":32,"tag":99,"props":2294,"children":2295},{"style":122},[2296],{"type":37,"value":125},{"type":32,"tag":99,"props":2298,"children":2299},{"style":128},[2300],{"type":37,"value":2301},"${{ secrets.SLACK_WEBHOOK_PERF }}\n",{"type":32,"tag":33,"props":2303,"children":2304},{},[2305,2307,2311],{"type":37,"value":2306},"Ainsi, quand un ingénieur ouvre une PR, il voit immédiatement à la fois le ✗ rouge en CI ",{"type":32,"tag":57,"props":2308,"children":2309},{},[2310],{"type":37,"value":68},{"type":37,"value":2312}," une notification Slack si le budget est dépassé — l'attention est captée instantanément.",{"type":32,"tag":40,"props":2314,"children":2316},{"id":2315},"intégrer-les-budgets-aux-systèmes-feature-flag",[2317],{"type":37,"value":2318},"Intégrer les Budgets aux Systèmes Feature Flag",{"type":32,"tag":33,"props":2320,"children":2321},{},[2322],{"type":37,"value":2323},"Certaines features sont intrinsèquement lourdes : un widget de chat en direct (80 KB JS), un moteur de personnalisation (150 KB + coût runtime), un lecteur vidéo (200 KB). Au lieu de les ouvrir à tous les utilisateurs, testez-les sur un segment où le performance budget n'est pas dépassé (par ex. desktop + connexion rapide), puis déployez progressivement.",{"type":32,"tag":33,"props":2325,"children":2326},{},[2327],{"type":37,"value":2328},"Vous pouvez définir des règles dans LaunchDarkly ou votre propre système :",{"type":32,"tag":88,"props":2330,"children":2332},{"className":842,"code":2331,"language":844,"meta":16,"style":16},"\u002F\u002F featureFlags.js\nimport { getConnectionSpeed } from '.\u002Futils';\n\nexport function shouldEnableChatWidget(user, vitals) {\n  const is4G = getConnectionSpeed() === '4g';\n  const goodLCP = vitals.lcp \u003C 2000;\n  \n  return is4G && goodLCP && user.tier === 'premium';\n}\n",[2333],{"type":32,"tag":95,"props":2334,"children":2335},{"__ignoreMap":16},[2336,2344,2369,2376,2416,2456,2491,2498,2543],{"type":32,"tag":99,"props":2337,"children":2338},{"class":101,"line":102},[2339],{"type":32,"tag":99,"props":2340,"children":2341},{"style":106},[2342],{"type":37,"value":2343},"\u002F\u002F featureFlags.js\n",{"type":32,"tag":99,"props":2345,"children":2346},{"class":101,"line":112},[2347,2351,2356,2360,2365],{"type":32,"tag":99,"props":2348,"children":2349},{"style":316},[2350],{"type":37,"value":864},{"type":32,"tag":99,"props":2352,"children":2353},{"style":122},[2354],{"type":37,"value":2355}," { getConnectionSpeed } ",{"type":32,"tag":99,"props":2357,"children":2358},{"style":316},[2359],{"type":37,"value":874},{"type":32,"tag":99,"props":2361,"children":2362},{"style":128},[2363],{"type":37,"value":2364}," '.\u002Futils'",{"type":32,"tag":99,"props":2366,"children":2367},{"style":122},[2368],{"type":37,"value":884},{"type":32,"tag":99,"props":2370,"children":2371},{"class":101,"line":134},[2372],{"type":32,"tag":99,"props":2373,"children":2374},{"emptyLinePlaceholder":890},[2375],{"type":37,"value":893},{"type":32,"tag":99,"props":2377,"children":2378},{"class":101,"line":159},[2379,2384,2389,2394,2398,2403,2407,2412],{"type":32,"tag":99,"props":2380,"children":2381},{"style":316},[2382],{"type":37,"value":2383},"export",{"type":32,"tag":99,"props":2385,"children":2386},{"style":316},[2387],{"type":37,"value":2388}," function",{"type":32,"tag":99,"props":2390,"children":2391},{"style":904},[2392],{"type":37,"value":2393}," shouldEnableChatWidget",{"type":32,"tag":99,"props":2395,"children":2396},{"style":122},[2397],{"type":37,"value":912},{"type":32,"tag":99,"props":2399,"children":2400},{"style":915},[2401],{"type":37,"value":2402},"user",{"type":32,"tag":99,"props":2404,"children":2405},{"style":122},[2406],{"type":37,"value":1992},{"type":32,"tag":99,"props":2408,"children":2409},{"style":915},[2410],{"type":37,"value":2411},"vitals",{"type":32,"tag":99,"props":2413,"children":2414},{"style":122},[2415],{"type":37,"value":923},{"type":32,"tag":99,"props":2417,"children":2418},{"class":101,"line":173},[2419,2423,2428,2432,2437,2442,2447,2452],{"type":32,"tag":99,"props":2420,"children":2421},{"style":316},[2422],{"type":37,"value":931},{"type":32,"tag":99,"props":2424,"children":2425},{"style":138},[2426],{"type":37,"value":2427}," is4G",{"type":32,"tag":99,"props":2429,"children":2430},{"style":316},[2431],{"type":37,"value":941},{"type":32,"tag":99,"props":2433,"children":2434},{"style":904},[2435],{"type":37,"value":2436}," getConnectionSpeed",{"type":32,"tag":99,"props":2438,"children":2439},{"style":122},[2440],{"type":37,"value":2441},"() ",{"type":32,"tag":99,"props":2443,"children":2444},{"style":316},[2445],{"type":37,"value":2446},"===",{"type":32,"tag":99,"props":2448,"children":2449},{"style":128},[2450],{"type":37,"value":2451}," '4g'",{"type":32,"tag":99,"props":2453,"children":2454},{"style":122},[2455],{"type":37,"value":884},{"type":32,"tag":99,"props":2457,"children":2458},{"class":101,"line":186},[2459,2463,2468,2472,2477,2482,2487],{"type":32,"tag":99,"props":2460,"children":2461},{"style":316},[2462],{"type":37,"value":931},{"type":32,"tag":99,"props":2464,"children":2465},{"style":138},[2466],{"type":37,"value":2467}," goodLCP",{"type":32,"tag":99,"props":2469,"children":2470},{"style":316},[2471],{"type":37,"value":941},{"type":32,"tag":99,"props":2473,"children":2474},{"style":122},[2475],{"type":37,"value":2476}," vitals.lcp ",{"type":32,"tag":99,"props":2478,"children":2479},{"style":316},[2480],{"type":37,"value":2481},"\u003C",{"type":32,"tag":99,"props":2483,"children":2484},{"style":138},[2485],{"type":37,"value":2486}," 2000",{"type":32,"tag":99,"props":2488,"children":2489},{"style":122},[2490],{"type":37,"value":884},{"type":32,"tag":99,"props":2492,"children":2493},{"class":101,"line":204},[2494],{"type":32,"tag":99,"props":2495,"children":2496},{"style":122},[2497],{"type":37,"value":1079},{"type":32,"tag":99,"props":2499,"children":2500},{"class":101,"line":217},[2501,2506,2511,2516,2521,2525,2530,2534,2539],{"type":32,"tag":99,"props":2502,"children":2503},{"style":316},[2504],{"type":37,"value":2505},"  return",{"type":32,"tag":99,"props":2507,"children":2508},{"style":122},[2509],{"type":37,"value":2510}," is4G ",{"type":32,"tag":99,"props":2512,"children":2513},{"style":316},[2514],{"type":37,"value":2515},"&&",{"type":32,"tag":99,"props":2517,"children":2518},{"style":122},[2519],{"type":37,"value":2520}," goodLCP ",{"type":32,"tag":99,"props":2522,"children":2523},{"style":316},[2524],{"type":37,"value":2515},{"type":32,"tag":99,"props":2526,"children":2527},{"style":122},[2528],{"type":37,"value":2529}," user.tier ",{"type":32,"tag":99,"props":2531,"children":2532},{"style":316},[2533],{"type":37,"value":2446},{"type":32,"tag":99,"props":2535,"children":2536},{"style":128},[2537],{"type":37,"value":2538}," 'premium'",{"type":32,"tag":99,"props":2540,"children":2541},{"style":122},[2542],{"type":37,"value":884},{"type":32,"tag":99,"props":2544,"children":2545},{"class":101,"line":26},[2546],{"type":32,"tag":99,"props":2547,"children":2548},{"style":122},[2549],{"type":37,"value":780},{"type":32,"tag":33,"props":2551,"children":2552},{},[2553],{"type":37,"value":2554},"De cette façon, la décision « ajoutons un widget de chat » ne crée pas un risque « tous les utilisateurs verront le LCP augmenter de 300 ms » — elle est activée uniquement sur le segment qui satisfait les conditions, les données RUM sont collectées, l'impact CVR est mesuré, puis vous faites un full rollout ou revertez. Quand vous partagez cette décision tradeoff avec le marketing et le product, vous pouvez être précis : « Le chat augmente le CVR de +0,4 % mais fait monter le LCP à 2,8 secondes — net +8K$ de revenu mais l'UX baisse. On continue ? »",{"type":32,"tag":40,"props":2556,"children":2558},{"id":2557},"enforcing-le-performance-budget-en-commerce-headless",[2559],{"type":37,"value":2560},"Enforcing le Performance Budget en Commerce Headless",{"type":32,"tag":33,"props":2562,"children":2563},{},[2564],{"type":37,"value":2565},"L'architecture headless commerce (par ex. Shopify Hydrogen, Next.js + Shopify API) est généralement plus rapide que les thèmes Liquid parce que vous contrôlez le JavaScript côté client et pouvez faire de l'hydratation sélective. Mais puisque le contrôle est le vôtre, le risque de régression l'est aussi — une mise à jour npm peut ajouter 70 KB au bundle.",{"type":32,"tag":33,"props":2567,"children":2568},{},[2569,2571,2578],{"type":37,"value":2570},"Chez Roibase, dans nos engagements de ",{"type":32,"tag":787,"props":2572,"children":2575},{"href":2573,"rel":2574},"https:\u002F\u002Fwww.roibase.com.tr\u002Ffr\u002Fshopify",[791],[2576],{"type":37,"value":2577},"Services Shopify Partner",{"type":37,"value":2579},", nous appliquons ce workflow lors des migrations headless :",{"type":32,"tag":2581,"props":2582,"children":2583},"ol",{},[2584,2596,2613,2623,2633],{"type":32,"tag":2585,"props":2586,"children":2587},"li",{},[2588,2594],{"type":32,"tag":2589,"props":2590,"children":2591},"strong",{},[2592],{"type":37,"value":2593},"Établir une baseline :",{"type":37,"value":2595}," Collectez les données RUM du thème Liquid existant (30 jours). Enregistrez les valeurs médiane LCP, TBT, CLS.",{"type":32,"tag":2585,"props":2597,"children":2598},{},[2599,2604,2606,2611],{"type":32,"tag":2589,"props":2600,"children":2601},{},[2602],{"type":37,"value":2603},"Gate le prototype headless avec Lighthouse CI :",{"type":37,"value":2605}," Chaque commit doit respecter le budget dans ",{"type":32,"tag":95,"props":2607,"children":2609},{"className":2608},[],[2610],{"type":37,"value":379},{"type":37,"value":2612},". Le premier déploiement doit être 20 % meilleur que la baseline.",{"type":32,"tag":2585,"props":2614,"children":2615},{},[2616,2621],{"type":32,"tag":2589,"props":2617,"children":2618},{},[2619],{"type":37,"value":2620},"Comparaison RUM en production :",{"type":37,"value":2622}," Pour les 7 premiers jours, testez A\u002FB les deux versions (par ex. 10 % du traffic sur la nouvelle headless), comparez les métriques RUM.",{"type":32,"tag":2585,"props":2624,"children":2625},{},[2626,2631],{"type":32,"tag":2589,"props":2627,"children":2628},{},[2629],{"type":37,"value":2630},"Configurer les alertes de régression :",{"type":37,"value":2632}," Après la migration, définissez les monitors DataDog pour LCP \u003C 2,5s, TBT \u003C 200ms.",{"type":32,"tag":2585,"props":2634,"children":2635},{},[2636,2641],{"type":32,"tag":2589,"props":2637,"children":2638},{},[2639],{"type":37,"value":2640},"Audit trimestriel :",{"type":37,"value":2642}," Chaque trimestre, auditez la taille du bundle et nettoyez les dépendances inutilisées.",{"type":32,"tag":33,"props":2644,"children":2645},{},[2646],{"type":37,"value":2647},"Chez un client e-commerce, ce processus a produit",{"type":32,"tag":2649,"props":2650,"children":2651},"style",{},[2652],{"type":37,"value":2653},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":134,"depth":134,"links":2655},[2656,2657,2660,2661,2665,2666],{"id":42,"depth":112,"text":45},{"id":78,"depth":112,"text":81,"children":2658},[2659],{"id":800,"depth":134,"text":803},{"id":818,"depth":112,"text":821},{"id":1853,"depth":112,"text":1856,"children":2662},[2663,2664],{"id":1864,"depth":134,"text":1867},{"id":2072,"depth":134,"text":2075},{"id":2315,"depth":112,"text":2318},{"id":2557,"depth":112,"text":2560},"markdown","content:fr:tech:web-performance-budgets-karar-mekanizmasi.md","content","fr\u002Ftech\u002Fweb-performance-budgets-karar-mekanizmasi.md","fr\u002Ftech\u002Fweb-performance-budgets-karar-mekanizmasi","md",1783289083870]