Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tarantool/gperftools
Lua bindings for Google Performance Tools CPU Profiler
https://github.com/tarantool/gperftools
Last synced: 3 months ago
JSON representation
Lua bindings for Google Performance Tools CPU Profiler
- Host: GitHub
- URL: https://github.com/tarantool/gperftools
- Owner: tarantool
- License: other
- Created: 2015-06-17T11:39:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-08T06:27:07.000Z (about 3 years ago)
- Last Synced: 2024-04-05T21:35:19.239Z (7 months ago)
- Language: Lua
- Size: 12.7 KB
- Stars: 16
- Watchers: 41
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tarantool - gperftools - (Packages / Profilers)
README
# gperftools - Lua bindings for Google Performance Tools CPU Profiler
[![Build Status](https://travis-ci.org/tarantool/gperftools.png?branch=master)](https://travis-ci.org/tarantool/gperftools)## 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:``` bash
luarocks install https://raw.githubusercontent.com/tarantool/gperftools/master/gperftools-scm-1.rockspec --local
```See [tarantool/rocks][TarantoolRocks] 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][gperftools]):
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
* [CPU Profiler Documentation][gperftools]
* [Tarantool][]
* [Tarantool Rocks][TarantoolRocks][gperftools]: https://gperftools.github.io/gperftools/cpuprofile.html
[Tarantool]: http://github.com/tarantool/tarantool
[TarantoolRocks]: https://github.com/tarantool/rocks