Skip to content

tarantool/gperftools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gperftools - Lua bindings for Google Performance Tools CPU Profiler

Build Status

Getting Started

Prerequisites

  • Tarantool 1.5+ or LuaJIT 2.0+
  • libprofiler.so from gperftools package
    • apt-get install libgoogle-perftools4 # Debian/Ubuntu, main repository
    • yum install gperftools-libs # RHEL/CentOS/Fedora, EPEL repository

Installation

Use package for your distribution from http://tarantool.org/ repository. You can also use LuaRocks:

luarocks install https://raw.githubusercontent.com/tarantool/gperftools/master/gperftools-scm-1.rockspec --local

See tarantool/rocks for LuaRocks configuration details.

Usage

Start profiler:

tarantool> cpuprof = require('gperftools.cpu')
tarantool> cpuprof.start('/home/roman/tarantool-on-production.prof')

Wait some time to get performance metricrs to be collected (at least couple minutes).

Flush actual results to disk (you can do that multiple times):

tarantool> cpuprof.flush()

Analize the output (see documentation):

pprof --text /usr/bin/tarantool /home/roman/tarantool-on-production.prof

Stop profiling when you don’t need it anymore:

tarantool> cpuprof.stop()

See Also

About

Lua bindings for Google Performance Tools CPU Profiler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages