スキル一覧に戻る
IvanTorresEdge

performance-profiling

by IvanTorresEdge

0🍴 1📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: performance-profiling description: pprof usage and performance analysis. Use when profiling applications.

Performance Profiling Skill

Using pprof for performance analysis.

When to Use

Use when identifying performance bottlenecks.

CPU Profiling

# During tests
go test -cpuprofile=cpu.out -bench=.

# Analyze
go tool pprof cpu.out

# Web interface
go tool pprof -http=:8080 cpu.out

Memory Profiling

# During tests
go test -memprofile=mem.out -bench=.

# Analyze
go tool pprof mem.out

HTTP Endpoint

import _ "net/http/pprof"

func main() {
    go func() {
        log.Println(http.ListenAndServe("localhost:6060", nil))
    }()
    // your code
}

Access profiles at:

  • http://localhost:6060/debug/pprof/
  • http://localhost:6060/debug/pprof/heap
  • http://localhost:6060/debug/pprof/goroutine

pprof Commands

(pprof) top      # Top functions
(pprof) list     # Source code view
(pprof) web      # Graph view
(pprof) pdf      # PDF output

Best Practices

  • Profile in production-like conditions
  • Profile before optimizing
  • Focus on hot paths
  • Check both CPU and memory
  • Use flamegraphs for visualization

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です