Skip to content

Script for generating flamegraphs from ES hot_threads

Igor requested to merge collapse-hot-threads into master

ES has a hot_threads endpoint which performs CPU profiling and gives you stacks for threads spending a lot of time on cpu (or configurably, blocking or waiting).

In https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10234 we are working on getting those dumped periodically.

This script takes the raw text output from that endpoint and turns it into something that flamegraph.pl can understand. This way we get snazzy flamegraphs that look like this:

hot_threads.4.svg

Merge request reports