All Projects → xyctruth → profiler

xyctruth / profiler

Licence: Apache-2.0 license
Continuous profiling based on pprof

Programming Languages

go
31211 projects - #10 most used programming language
Vue
7211 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
Smarty
1635 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to profiler

parca-agent
eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
Stars: ✭ 250 (+13.12%)
Mutual labels:  profiling, pprof, continuous-profiling
parca
Continuous profiling for analysis of CPU and memory usage, down to the line number and throughout time. Saving infrastructure cost, improving performance, and increasing reliability.
Stars: ✭ 2,834 (+1182.35%)
Mutual labels:  profiling, pprof, continuous-profiling
Tracy
C++ frame profiler
Stars: ✭ 3,115 (+1309.5%)
Mutual labels:  profiler, profiling
Nlp profiler
A simple NLP library allows profiling datasets with one or more text columns. When given a dataset and a column name containing text data, NLP Profiler will return either high-level insights or low-level/granular statistical information about the text in that column.
Stars: ✭ 181 (-18.1%)
Mutual labels:  profiler, profiling
Guider
Performance Analyzer
Stars: ✭ 393 (+77.83%)
Mutual labels:  profile, trace
Pyinstrument
🚴 Call stack profiler for Python. Shows you why your code is slow!
Stars: ✭ 3,870 (+1651.13%)
Mutual labels:  profile, profiler
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-36.2%)
Mutual labels:  profiler, profiling
golden
a benchmark for compile-time and/or runtime Nim 🏆
Stars: ✭ 28 (-87.33%)
Mutual labels:  profile, profiling
Agi
Android GPU Inspector
Stars: ✭ 327 (+47.96%)
Mutual labels:  profiler, trace
Remake
Enhanced GNU Make - tracing, error reporting, debugging, profiling and more
Stars: ✭ 538 (+143.44%)
Mutual labels:  profile, trace
Tuna
Python profile viewer
Stars: ✭ 399 (+80.54%)
Mutual labels:  profile, profiler
Sol Profiler
CLI Tool to List & Store Solidity Smart Contract Methods Attributes
Stars: ✭ 20 (-90.95%)
Mutual labels:  profile, profiler
Py Spy
Sampling profiler for Python programs
Stars: ✭ 7,709 (+3388.24%)
Mutual labels:  profiler, profiling
Pprof
pprof is a tool for visualization and analysis of profiling data
Stars: ✭ 4,990 (+2157.92%)
Mutual labels:  profiler, pprof
Hotspot
The Linux perf GUI for performance analysis.
Stars: ✭ 2,415 (+992.76%)
Mutual labels:  profiler, profiling
Scalene
Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python
Stars: ✭ 4,819 (+2080.54%)
Mutual labels:  profiler, profiling
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+932.13%)
Mutual labels:  profiler, profiling
Androidgodeye
An app performance monitor(APM) , like "Android Studio profiler", you can easily monitor the performance of your app real time in browser
Stars: ✭ 2,430 (+999.55%)
Mutual labels:  profile, profiler
bytehound
A memory profiler for Linux.
Stars: ✭ 2,639 (+1094.12%)
Mutual labels:  profiler, profiling
Memory Profiler
A memory profiler for Linux.
Stars: ✭ 2,422 (+995.93%)
Mutual labels:  profiler, profiling

Profiler

Go Report Card codecov Build status Release status LICENSE status

English / 中文

简介

Profiler 是一个基于 go pprof 与 go trace 持续性能剖析工具

  • 支持的样本
    • trace fgprof profile mutex heap goroutine allocs block threadcreate
  • 配置热更新
    • 根据配置文件收集目标服务的样本
    • 收集程序会监听配置文件的变化,即时应用变化后的配置文件
  • 图表趋势
    • 提供图表观测多个服务性能指标的趋势,找出性能问题的时间点
    • 每一个气泡都是一份 Profile 与 Trace 的样本文件
  • 详细分析
    • 点击图表中的气泡跳转到 Profile 与 Trace 的详细页面进行进一步详细的分析

演示

图表趋势 点击气泡跳转 Profile 详情
点击气泡跳转 Trace 详情 点击气泡跳转 Trace 详情

入门

本地

启动服务端 端口为:8080

go run server/main.go 

启动前端 端口为:80

cd ui
npm install --registry=https://registry.npm.taobao.org
npm run dev --base_api_url=http://localhost:8080

Docker

docker run -d -p 80:80 --name profiler xyctruth/profiler:latest

使用自定义的配置文件

mkdir ~/profiler-config/
cp ./collector.yaml ~/profiler-config/
docker run -d -p 80:80 -v ~/profiler-config/:/profiler/config/ --name profiler xyctruth/profiler:latest

使用持久化数据

docker run -d -p 80:80 -v ~/profiler-data/:/profiler/data/ --name profiler xyctruth/profiler:latest

Helm

安装 Profiler chart:

helm install --create-namespace -n profiler-system profiler ./charts/profiler

更多说明在 Helm docs

收集配置

需要被收集分析的 golang 程序,需要提供 net/http/pprof 端点,并配置在 ./collector.yaml 配置文件中。

配置文件可以在线更新,收集程序会监听配置文件的变化,即时应用变化后的配置文件。

collector.yaml

collector:
  targetConfigs:

    profiler-server:        # 目标名称
      interval: 15s         # 抓取间隔
      expiration: 0         # 无过期时间
      instances: ["localhost:9000"]  # 目标服务host
      labels:
        namespace: f005
        type: gateway
      profileConfigs:       # 使用默认配置 

    server2:
      interval: 10s
      expiration: 168h      # 过期时间7天
      instances: ["localhost:9000"]
      labels:
        namespace: f004
        type: svc
      profileConfigs:       # 覆盖部分默认配置字段
        trace:
          enable: false
        fgprof:
          enable: false
        profile:
          path: /debug/pprof/profile?seconds=10
          enable: false
        heap:
          path: /debug/pprof/heap

profileConfigs 默认配置

默认 trace 分析关闭, 因为 trace 文件过大,大约在(500KB ~ 2M), 需要开启 trace 分析在 collector.yaml 设置覆盖默认的 trace 配置.

profileConfigs:
  profile:
    path: /debug/pprof/profile?seconds=10
    enable: true
  fgprof:
    path: /debug/fgprof?seconds=10
    enable: true
  mutex:
    path: /debug/pprof/mutex
    enable: true
  heap:
    path: /debug/pprof/heap
    enable: true
  goroutine:
    path: /debug/pprof/goroutine
    enable: true
  allocs:
    path: /debug/pprof/allocs
    enable: true
  block:
    path: /debug/pprof/block
    enable: true
  threadcreate:
    path: /debug/pprof/threadcreate
    enable: true
  trace:
    path: /debug/pprof/trace?seconds=10
    enable: false

JetBrains OSS License

JetBrains Logo (Main) logo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].