Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LighthouseCIによるパフォーマンス測定/Performance measuremen...
Search
ワンキャリアTech
October 20, 2025
0
2
LighthouseCIによるパフォーマンス測定/Performance measurement with LighthouseCI
SREチームの中岡が、ココナラ様・ソーシャルデータバンク様との合同勉強会にて登壇した際の資料となります。
ワンキャリアTech
October 20, 2025
Tweet
Share
More Decks by ワンキャリアTech
See All by ワンキャリアTech
SREとSWE、2つの視点から得た学び/Lessons learned from two perspectives: SRE and SWE
onecareer_tech
0
9
5年先の理想を見据えた ワンキャリアにおけるサービス変遷 / ONE CAREER's Service Transition: Looking Five Years Ahead
onecareer_tech
0
38
GKEを活用した、社内生成AI基盤の利用ログ対応 / Support for in-house generated AI infrastructure usage logs using GKE
onecareer_tech
0
120
「使われないAI」からの脱却 〜 現場を動かす浸透のコツ 〜/Breaking away from "unused AI" - Tips for spreading it to get things moving on the front lines -
onecareer_tech
0
200
「開発生産性」ではなく、 事業の投資対効果に向き合う「事業生産性」へ/From "development productivity" to "business productivity" that focuses on business return on investment
onecareer_tech
4
17k
ワンキャリアにおける複数 Rails API サーバーの共通データベース運用事例/OneCareer's common database operation for multiple Rails API servers
onecareer_tech
0
130
暗黙知は音声で形式知にしよう。 音声入力が生み出す新たな生成AIの価値について/Let's turn tacit knowledge into explicit knowledge through voice. The value of new generative AI created by voice input
onecareer_tech
0
78
ワンキャリア社から学ぶ経営と開発現場をつなぐAI戦略と実践 / Learn from OneCareer: AI Strategy and Practice Connecting Management and Development Sites
onecareer_tech
0
110
ワンキャリアのエンジニア組織における 「投資対効果」との向き合い方・使い方 / How to deal with and use "return on investment" in OneCareer's engineering organization
onecareer_tech
1
340
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
910
It's Worth the Effort
3n
187
28k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Context Engineering - Making Every Token Count
addyosmani
7
260
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Code Reviewing Like a Champion
maltzj
526
40k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Scaling GitHub
holman
463
140k
Transcript
LighthouseCIʹΑΔύϑΥʔϚϯεଌఆ 2025/09/29ɹגࣜձࣾϫϯΩϟϦΞ தԬ ໌
Career झຯ ͻͱ͜ͱ ONE CAREER Inc . ࣗݾհ Copyright ©
ONE CAREER Inc. All Rights Reserved. தԬ ໌ ॴଐձࣾɿSIer → SES → ࣄۀձࣾ ΩϟϦΞɿΠϯϑϥΤϯδχΞ → Ϛωʔδϟʔ → SRE(ࠓ) 2 εΩϡʔόμΠϏϯά SRE ຊΑΖ͓͘͠ئ͍͠·͢ʂ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 3
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 4
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
Copyright © ONE CAREER Inc. All Rights Reserved. 5 Core
Web VitalsΛ͝ଘ͡Ͱ͔͢ʁ
Copyright © ONE CAREER Inc. All Rights Reserved. ࠷େίϯςϯπͷදࣔ࣌ؒ 2.5ඵҎ͕ཧ
ϢʔβʔΞΫγϣϯޙͷදࣔ 200ϛϦඵະຬ͕ཧ ૢ࡞࣌ͷදࣔζϨ߹͍ 0.1ະຬ͕ཧ Core Web Vitalsͱ 6 ϢʔβʔମݧʢUXʣΛΑΓྑ͘͢ΔͨΊGoogleͰఏএ͞ΕͨҎԼ3ͭͷࢦඪ ϫϯΩϟϦΞͰɺϢʔβʔମݧʹ݁͢ΔLCPΛɺSLOͷࢦඪͷͻͱͭͱͯ͠ܭଌ ը૾ࢀরݩɿhttps://www.debugbear.com/blog/hardest-core-web-vitals-metric
Copyright © ONE CAREER Inc. All Rights Reserved. ϫϯΩϟϦΞͰɺChromeͷ։ൃπʔϧʹଂ͞Ε͍ͯΔʮLighthouseʯΛ༻͍ͯଌఆ Core
Web VitalsΛଌఆ͢Δπʔϧ 7 LighthouseɿҎԼ5ͭͷࢦඪ͔Β Core Web Vitals ΛଌఆͰ͖ΔΦʔϓϯιʔεͷπʔϧ ɹ࠷େίϯςϯπͷදࣔ࣌ؒ ɹૢ࡞࣌ͷදࣔζϨ߹͍ ɹϢʔβʔૢ࡞ʹϖʔδ͕ԠͰ͖ͳ͍࣌ؒͷ߹ܭ ɹϒϥβ͕࠷ॳͷDOMίϯςϯπඳըʹ͔͔Δ࣌ؒ ɹϖʔδͷಡΈࠐΈதʹίϯςϯπ͕ࢹ֮తʹදࣔ͞ΕΔ࣌ؒ ɹLCPʢLargest Contentful Paintʣ ɹCLSʢCumulative Layout Shiftʣ ɹTBTʢTotal Blocking Timeʣ ɹFCPʢFirst Contentful Paintʣ ɹSI ʢSpeed Indexʣ ब׆αΠτʮϫϯΩϟϦΞʯͷ Topϖʔδॏཁը໘ͳͲΛରʹ ܭଌ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 8
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
Copyright © ONE CAREER Inc. All Rights Reserved. LighthouseͰଌఆ݁Ռ͕҆ఆͤͣɺLighthouseCIͷಋೖΛ࣮ࢪ LighthouseCIͷಋೖͷഎܠ
9 • ॳͷํ๏ɿChromeଂͷʮLighthouseʯͰखಈଌఆ • ໘ͨ͠՝ɿ݁Ռ͕҆ఆ͠ͳ͍ ◦ ଌఆ͢ΔPCͷੑೳωοτڥʹΑ͕ͬͯҟͳΓɺ݁ՌΛਖ਼֬ʹൺֱͰ͖ͳ͍ঢ়گʹ • ղܾࡦɿࣗಈԽπʔϧͷʮLighthouseCIʯΛಋೖ • తɿ͍ͭɾ୭͕ͬͯʮಉ͡ڥʯͰଌఆͰ͖ΔΑ͏ʹ͢Δ
Copyright © ONE CAREER Inc. All Rights Reserved. WebαΠτͷύϑΥʔϚϯεΛܧଓతʹࢹɾվળ͢ΔͨΊͷࣗಈԽπʔϧ LighthouseCIͱʁ
10 • Github ActionsͳͲͷCI/CDڥͰ࣮ߦ • ࣮ߦڥ͕ಉҰͳͷͰɺϒϨ͕ى͜Γʹ͍ͣ͘ • ࢀߟɿLighthouseCIͷϦϙδτϦ ◦ https://github.com/GoogleChrome/lighthouse-ci
Copyright © ONE CAREER Inc. All Rights Reserved. 11 ࢀߟɿLighthouseCIͷઃఆ
(Github Actionsͷ߹) name: Lighthouse CI on: workflow_dispatch: # खಈ࣮ߦ jobs: lighthouse: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v5 - name: Setup Node.js uses: actions/setup-node@v5 with: node-version: '22' - name: Install dependencies run: | npm install -g @lhci/
[email protected]
- name: Run Lighthouse CI # ConfigϑΝΠϧͷఆٛʹै࣮ͬͯߦ run: lhci collect --config=.lighthouseci/lighthouserc.js env: LHCI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Prepare artifacts if: always() run: | mkdir -p lighthouse-reports cp .lighthouseci/lhr-*.html lighthouse-reports/ || echo "No HTML files to copy" cp .lighthouseci/lhr-*.json lighthouse-reports/ || echo "No JSON files to copy" ls -la lighthouse-reports/ - name: Upload Lighthouse reports # ݁ՌΛGithub্͔ΒμϯϩʔυՄೳʹ͢Δ uses: actions/upload-artifact@v4 if: always() with: name: lhci-report path: lighthouse-reports/ retention-days: 30 “.github/workflows/lighthouse-ci.yml” ͱ͍͏ϑΝΠϧ໊Ͱ࡞
Copyright © ONE CAREER Inc. All Rights Reserved. ࢀߟɿLighthouseCIͷઃఆ (Github
Actionsͷ߹) 12 collect: { url: [ 'https://onecareer.jp/', // ଌఆ͍ͨ͠URL ], numberOfRuns: 3, // ࢼߦճ settings: { preset: 'desktop', formFactor: 'desktop', // σεΫτοϓڥΛ໌ࣔతʹࢦఆ onlyCategories: ['performance'], // ύϑΥʔϚϯεଌఆʹूத ConfigϑΝΠϧ: “lighthouserc.js“ ͱ͍͏ϑΝΠϧ໊Ͱهड़ʢҎԼɺઃఆ༰Λൈਮʣ
Copyright © ONE CAREER Inc. All Rights Reserved. ࢀߟɿLighthouseCIͷઃఆ (Github
Actionsͷ߹) 13 throttling: { rttMs: 10, // ϥϯυτϦοϓλΠϜ(ms) requestLatencyMs: 0, // ϦΫΤετϨΠςϯγ downloadThroughputKbps: 9000, // μϯϩʔυɿ9Mbps uploadThroughputKbps: 9000, // Ξοϓϩʔυɿ9Mbps cpuSlowdownMultiplier: 0.1 // CPUੑೳ10ഒԽʢM4 Pro/Max૬ʣ }, throttlingMethod: 'simulate', // ࣮ࡍͷ௨৴ߦΘͣܭࢉͰ༧ଌ } ConfigϑΝΠϧ: “lighthouserc.js“ ͱ͍͏ϑΝΠϧ໊Ͱهड़ʢҎԼɺઃఆ༰Λൈਮʣ
Copyright © ONE CAREER Inc. All Rights Reserved. 14 ͜ΕͰҰ؏ͨ͠ج४Ͱ
ൺֱͰ͖ΔΑ͏ʹͳͬͨ… ͣͩͬͨɻ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 15
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
Copyright © ONE CAREER Inc. All Rights Reserved. LighthouseCIͱखݩͷPCͷܭଌʹେ͖ͳ͕ࠩ... ಋೖʹΑΔ৽ͨͳ՝
16 • ৽ͨͳɿࣗಈπʔϧͱखݩͷPCͰɺ݁Ռʹେ͖ͳ͕ࠩੜ·Εͯ͠·ͬͨ ◦ ಛʹɺ ಡΈࠐΈʢLCPʣ͕ ࣮ࡍΑΓ͔ͳΓ͍Ͱࢉग़͞Εͯ͠·͏ ࣮ػʢMacBook pro M4ʣ+ Chrome LighthouseCI
Copyright © ONE CAREER Inc. All Rights Reserved. Lighthouseʹ͓͚Δܭଌํ๏ͷҧ͍ͷେ͖͕͞ɺ݁ՌͷࠩΛੜΜͰ͍ͨ ͳͥ͜ͷΑ͏ͳ݁ՌʹͳΔͷ͔ʁ
17 • LighthouseCIɿSimulateϞʔυ ◦ ཧܭࢉͰείΞΛࢉग़͢Δ ◦ WebϖʔδΛղੳ͠ɺઃఆͨ͠ύϥϝʔλͰֶతʹܭଌ͢Δ ▪ ࣮ࡍʹWebʹΞΫηε͍ͯ͠Δ݁ՌͰͳ͍ • ࣮ػɿDevToolsϞʔυ ◦ Chrome্ͰଳҬ੍ݶɺCPU༻ͷ੍ݶΛߦ্ͬͨͰɺ࣮ࡍͷΞΫηεΛߦ͏ ◦ Πϯλʔωοτڥੑೳʹґଘ͢Δ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 18
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
Copyright © ONE CAREER Inc. All Rights Reserved. LighthouseCIͷܭࢉ݅Λௐ͠ɺܭࢉ݁Ռ͕࣮ࡍͷڥͷʹۙ͘ͳΔΑ͏ʹνϡʔχϯά ղܾࡦ
19 είΞʹେ͖͘Өڹ͢ΔύϥϝʔλʢεϩοτϦϯάઃఆपΓʣ ߲ rttMS ʢϥϯυτϦοϓλΠϜʣ requestLatencyMs ʢϦΫΤετ։࢝ϨΠςϯγʣ ֓ཁ αʔόʔͱΫϥΠΞϯτؒͰɺ ύέοτ͕ԟ෮͢Δͷʹ͔͔Δ࣌ؒʢϛϦඵʣ ϒϥβ͕ϦΫΤετΛ։͔࢝ͯ͠Β ࣮ࡍʹωοτϫʔΫૹ৴͕࢝·Δ·ͰͷԆ ௐํ DevToolsϞʔυͰ140msʹઃఆ͞Ε͍ͯΔ͕ SimulateϞʔυͰಉ͡Λ͏ͱείΞ͕ஶ͘͠Լ → ࠷ऴతʹ10msʹௐɹɹ جຊతʹ0msͰͳ͍ͱஅ
Copyright © ONE CAREER Inc. All Rights Reserved. LighthouseCIͷܭࢉ݅Λௐ͠ɺܭࢉ݁Ռ͕࣮ࡍͷڥͷʹۙ͘ͳΔΑ͏ʹνϡʔχϯά ղܾࡦ
20 CPUॲཧೳྗઃఆ ߲ cpuSlowdownMultiplier CPU੍ݶഒʢεϩοτϦϯάʣ ֓ཁ ࣮ࡍͷCPUੑೳʹର͢Δ੍ݶഒ 1.0͕ඪ४ͰɺΛ্͛ΔͱʹɺΛԼ͛ΔͱߴʹͳΔ benchmarkindexͷΛݩʹഒΛܾఆ͢Δ ɾ͕2.0ɿCPUͷ͕͍ʢCPUΛʹͯ͠ܭࢉʣ ɾ͕0.1ɿCPUͷ͕࠷ʢCPUΛ10ഒʹͯ͠ܭࢉʣ ௐํ ࣮ߦ͢Δrunnerͷੑೳʹґଘ͢ΔͨΊɺCPUΛ࠷ʹͯ͠ܭଌ → Λ0.1ʢCPUੑೳΛ10ഒͱͯ͠ܭࢉ) ʹௐ
Copyright © ONE CAREER Inc. All Rights Reserved. ύϥϝʔλௐޙͷείΞൺֱ ݁Ռ
21 LighthouseCI ࣮ػʢMacBook pro M4ʣ+ Chrome • ௐલͱൺֱͯ͠ɺ࣮ػʹ͍ۙείΞ͕ग़ΔΑ͏ʹͳͬͨ • ͕ɺ࣮ػͱಉͷείΞʹͳΒͣ
࣍ Copyright © ONE CAREER Inc. All Rights Reserved. 22
• Core Web Vitalsʹ͍ͭͯ • LighthouseCIͷಋೖͷഎܠ • ಋೖʹΑΔ৽ͨͳ՝ • ղܾࡦͱ݁Ռ • ·ͱΊ
Copyright © ONE CAREER Inc. All Rights Reserved. LighthouseCIʹΑΔύϑΥʔϚϯεଌఆ ·ͱΊ
23 ͨͩ͠ܭࢉͱ࣮ଌͷࠩΛຒΊΔͨΊ CPUͳͲͷεϩοτϦϯάઃఆΛௐ͢Δ͜ͱ͕ॏཁ LighthouseCIɺڥʹґΒͣ CoreWebVital Λܭଌ͢Δ͜ͱ͕Ͱ͖Δ ଌఆํ๏ʹΑͬͯมΘΔͨΊɺͷઈରΑΓ ܧଓͯ͠ܭଌͨ͠ͷਪҠΛݟΔ͜ͱ͕େʂ