Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
APIサーバのレスポンス速度をふわっと把握したかった
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ramo798
January 23, 2024
Programming
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
APIサーバのレスポンス速度をふわっと把握したかった
若手・学生サーバーサイドエンジニアLT会
ラクーンホールディングス x ゆめみ のコラボLT会です!
https://yumemi.connpass.com/event/301942/
ramo798
January 23, 2024
More Decks by ramo798
See All by ramo798
メールの分類をLLMをつかってやってみた
ramo798
0
110
Other Decks in Programming
See All in Programming
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.5k
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
320
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
180
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
160
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
160
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
520
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
220
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
500
オーケストレーション記述言語 Katari
yukikurage
0
220
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
430
Six Lessons from altMBA
skipperchong
29
4.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Test your architecture with Archunit
thirion
2
2.5k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Code Reviewing Like a Champion
maltzj
529
40k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
680
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
470
Transcript
APIサーバのレスポンス速度 をふわっと把握したかった ramo
目次 • 自己紹介 • やりたいこと • きっかけ • 技術選定の話 •
使い方 • 結果
自己紹介 ramo 仕事→ URIHOというサービス開発。 好きなフレームワーク→ remix, sveltekit マイブーム→ cloudflare workers
最近matzさんとツーショット撮りました
URIHOについて 販売企業 URIHOは企業間取引において発生する 売掛金の未払い・倒産に備える保証サービスです。 購入企業
やりたいこと バックエンドのAPIサーバのレスポンス速度を計測したい
きっかけとか → 社内の人がISUCONを楽しそうにやってて羨ましかった →→ 来年はでる → そういえば自分のやってるサービスはどうなっているのか? →→ いろんなパターンで測定してみたい →→→ データがいっぱあるときとか
きっかけとか 「推測するな、計測せよ」と常々言われいていますので 計測することにしました。
今回やろうと思ったこと ローカルで動くもので測れるようにしたい → 既存機能の改修したときのベンチマークしたい → テストデータを多くした場合に速度の低下が起きないか等を気づきたい バックエンドAPIのレスポンス速度の計測から始める → ミニマムに始める → システムの構成的に、ボトルネックはそこになりがち
技術選定 Locustというpythonのライブラリを使うことにしました。 テストシナリオをコードで記述ができる → pythonで前処理等が書ける →→ ログイン処理が楽。共有が楽。テストデータの挿入ができる
Locustの使い方 from locust import HttpUser, task, between class ApiUser(HttpUser): wait_time
= between(1, 5) def on_start(self): self.client.post("/accounts/sign_in", { "account[email]": "email", "account[password]": "password" }) @task def load_test_api_endpoint(self): self.client.get("/endpoint")
使い方 locust -f your_script_name.py
結果
結果と展望 → ローカルサーバなので実際の数値ではないですが、大まかに傾向が把握で きました。 → 定期的に測るようにして機能が増えていくごとにどのように変化していく かを測定できると面白そう → 大量のテストデータを作成しての挙動も確認できるので未来のしんどくな るポイントを発見できる可能性がある
以上です。