As you know, Elixir does not have a built-in pprof library. In general Erlang/Elixir has very powerful and diverse profiling tools and as a cultural difference it doesn’t have pprof for observation at least like golang. However, you may not use or support Elixir with tools that use pprof ad-hoc.
I am happy to announce to you this library, in which I try to generate as meaningful pprof as possible using fprof.
Please do not hesitate for any kind of positive or negative criticism and support. I am open to any contribution that wants to provide support on a wider scale. Also, please don’t skip the parts that you think could have been written better on the basis of code Do not ignore the fact that I created this library in 2 days and it is very lacking
Hex documentation: Pprof
The observation and profiling culture of erlang and elixir is different from other languages.
Elixir/Erlang runs on a virtual machine (a.k.a beam) and each block of code represents a process.
Erlang provides many tools internally for monitoring abstracted processes and processes dependent functions.
This library produces as meaningful pprof output as possible using the built-in Erlang profiling tools. Thus, it tries to spread the Erlang/Elixir observability with pprof-based ad-hoc profiling tools.
A few important things
- This library an experimental and still under development, a library that needs to be careful to use on the production line.
- The accuracy of the outputs has been proven by testing with cross-tools. But this alpha version does not offer a full pprof service.
- fprof significantly slows down the application it is running on. It monitors all processes and collects their tracing data.
Therefore, even a 10-second data collection in large-scale applications can mean GBs of data.
It is recommended that the scrape seconds do not exceed 5 in order not to get lost in the abundance of data. More information: :fprof