GithubHelp home page GithubHelp logo

cj2a7t / ngx_google_perftools_profiler_module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chronolaw/ngx_google_perftools_profiler_module

0.0 0.0 0.0 43 KB

a better tools for nginx with google_perftools

License: BSD 2-Clause "Simplified" License

C++ 100.00%

ngx_google_perftools_profiler_module's Introduction

ngx_google_perftools_profiler_module

A better tool for nginx with google_perftools.

This module is inspired by official ngx_google_perftools_module.

Build Status

Installation

At first you must install gperftools library, For example:

sudo apt-get install google-perftools
sudo apt-get install libgoogle-perftools-dev

Then configure nginx, add this module:

./configure --add-module=path/to/ngx_google_perftools_profiler_module
make && make install

Configuration

In nginx.conf:

# profiler => cpu|heap|all
# name => file that keeps profiling information
# interval => time interval for dump heap profiling information, in seconds
google_perftools profiler=all name=ngx_prof interval=1s;

Profiles will be stored as /path/to/file.<worker_pid>.

Then you can use pprof to visualize results, for example:

pprof --svg /usr/local/nginx/sbin/nginx ./ngx_prof.4342 >a.svg
pprof --svg /usr/local/nginx/sbin/nginx ./ngx_prof.4342.0007.heap >b.svg

The svg samples can find in svg directory.

Lua API

You can use the Lua API binding lua-resty-gperftools for more flexible control.

See Also

ngx_google_perftools_profiler_module's People

Contributors

chronolaw avatar cj2a7t avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.