This is the Linux counterpart to the recently-added macOS-side support for sampling a test process that times out, prior to killing it.
This implementation is based on the Linux perf tools. Each distribution will have a different way to install it. The hook is skipped if Linux perf is not available.
On Ubuntu 16.04, the requisite support can be retrieved with:
sudo apt-get install perf-tools-unstable
Like the macOS side, the content out the time spent at each call point per backtrace is specified in a file in the session directory of the format:
{TestName.py}-{pid}.sample