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
GoConferenceMini2026inSendai_-_2026.02.21.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
o-ga
February 21, 2026
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GoConferenceMini2026inSendai_-_2026.02.21.pdf
o-ga
February 21, 2026
More Decks by o-ga
See All by o-ga
GoConnect#9 2025.08.19
tabe
0
110
kanazawa.go 2025.07.27
tabe
0
87
ランドネットLT会.pdf
tabe
0
37
Tavinikkiyとかいう構想半年、開発2ヶ月みたいなプロダクトを個人開発している話
tabe
0
35
テテミート 2024.11.22
tabe
0
35
Genericsについて改めて学んでみた
tabe
0
75
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
430
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
320
HDC tutorial
michielstock
2
830
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Speed Design
sergeychernyshev
33
2.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
For a Future-Friendly Web
brad_frost
183
10k
Chasing Engaging Ingredients in Design
codingconduct
0
290
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
960
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Transcript
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve Speaker: Taichi Abe Go.1.26の runtime/metricsが 便利そうな件(?)
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 自己紹介 • 阿部 太一 @o-ga09 • 仕事:株式会社ワクト • 趣味:Goで個人開発、山本彩の推し 活、ハイキュー!! の推し活 最推しは、孤爪研磨だけど、 宮城勢での推しは、月島蛍と日向翔陽!
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 目次 1. なぜ導入のされるのか 2. 既存のruntimeメトリクス取得(ReadMemStatsなど)の課題点 3. どういう機能か?何ができるのか? 4. 新しいruntime/metricsパッケージの基本概念とGo 1.26で追加されたメトリクス群の 紹介 5. APIの使い方 6. うれしくなること 7. まとめ 8. デモ的な何か
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve ⚠ 前提 • LTなので、導入部分のみとなります • Go初心者〜中級者くらいの人間の感想です
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 1. なぜ導入のされるのか 1. 同リリースで追加された「goroutine リークプロファイル」との連携 2. Green Tea GC の導入によるオブザーバビリティ強化の必要性 3. runtime/metrics パッケージの継続的な拡充方針
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 2. 既存のruntimeメトリクス取得の課題点や要望 などは? 1. MemStats のようにスケジューラも監視したい 2. num-active-goroutines / num-cpu という比率でアプリの過負荷を検知 したい 3. メトリクスが増えすぎて何を使えばよいかわからない問題
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 3. どういう機能か?何ができるのか? • 以前はpprofに頼るしかなかった、goroutineやOSスレッドの状態監視をruntimeパッ ケージで一括で確認できるようになった
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 4. 新しいruntime/metricsパッケージ の基本概念とGo 1.26で追加されたメト リクス群の紹介
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 復習:runtime/metricsとは? • Go ランタイム内部の状態をプログラムから直接読み取るための標準 API です。Go 1.16 で導入された • 読み取った値は metrics.Value として返され、必ず Kind を確認してから 取り出す必要がある • 複数のメトリクスを一度の呼び出しでまとめて取得する
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 一覧 メトリクス 内容 /sched/goroutines-created:goroutines 生成されたgoroutineの総数 /sched/goroutines/not-in-go:goroutines 行中またはブロックされている goroutineの数 /sched/goroutines/runnable:goroutines 実行準備可能状態の gorutineの数 /sched/goroutines/running:goroutines 実行中のgorutineの数 /sched/goroutines/waiting:goroutines 実行待ち中のgoroutineの数 /sched/threads/total:threads GoRuntimeが持っている現在の OSスレッド数 全量
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 5. APIの使い方 • func Read(m []Sample) を呼ぶのみ!シンプル! ◦ このパッケージに定義された関数はこれ1つ!分かりやすい!
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve APIの使い方例
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve https://go.dev/play/p/ko_jEzD432O
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 7. うれしくなること • スケジューラの状態をより細かく・リアルタイムに把握できるようになりました! ◦ 特に、goroutineの状態監視 ◦ 総数、実行中数、待ち数 以上
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve なぜ、タイトルに(?)をつけたのか?
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve • 全員にすぐに役に立つものではない • ライブラリ側で対応すればそれでいい • あったら便利!なものではある
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 8. まとめ • gcへ変更が入ったので、よりシステムの状態を詳細に監視できるようになったの は、ありがたい • リリースノートに少ししか書かれていない変更でもIssueをたどると数年越しの導 入みたいな機能がたくさんある • runtimeパッケージは詳細なメトリクスが見ることができるし、これからも拡充方 針らしいのでもっと勉強したい
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve デモ https://github.com/o-ga09/goconmini2026
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve slides made by k1LoW/deck The Go gopher was designed by Renée French. Go静聴ありがとうございま した!