Back to Materialize

Prof

src/prof-http/templates/prof.html

1231.8 KB
Original Source

{% extends "base.html" %} {% block title %}Profiling{% endblock %} {% block content %} {% if ever_symbolized %} Note. This page has been used during the lifetime of the process, so RAM usage will be permanently increased. {% else %} Warning. Using this page will cause a one-time permanent increase in RAM usage. The amount is unknown, but has, as of February 2024, been observed to range up to a few gigabytes. {% endif %}

Memory Profiling

{% match mem_prof %} {% when crate::MemProfilingStatus::Enabled with (start_time) %} {% match start_time %} {% when Some with (time) %} {% match time %} {% when ProfStartTime::TimeImmemorial %}

Jemalloc profiling active since server start

{% when ProfStartTime::Instant with (when) %}

Jemalloc profiling active for {{ when.elapsed()|fmt("{:?}") }}

{% endmatch %} DeactivateDownload allocation profile (jemalloc heap format)Download allocation profile (symbolized MZ format)Visualize heap profile (flamegraph) {% when None %}

Jemalloc profiling enabled but inactive.

Activate {% endmatch %} Download stats {% when crate::MemProfilingStatus::Disabled %}

Jemalloc profiling is not available.

{% if std::env::consts::OS == "macos" %}

Hint. Jemalloc profiling is not available on macOS. Use Linux instead.

{% endif %}

Hint. Restart {{executable}} with the following environment variable: MALLOC_CONF=prof:true.

{% endmatch %}

CPU Profiling

Merge threadsSampling rate in HzTime in seconds

Visualize time profile (flamegraph){% match mem_prof %} {% when crate::MemProfilingStatus::Enabled with (start_time) %} {% match start_time %} {% when Some with (_) %} Note. Will deactivate memory profiling. {% when None %} {% endmatch %} {% when crate::MemProfilingStatus::Disabled %} {% endmatch %} {% endblock %}