Skip to main content

profiling

Profile Lean programs with demangled names using samply and Firefox Profiler. Use when the user asks to profile a Lean binary or investigate performance.

Informações da origem

Repositório
leanprover/lean4
Última atividade na origem
1 de março de 2026 às 07:09
Idioma detectado do SKILL.md
inglês
Estrelas
9.400
Forks
1.019

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
profiling
description
Profile Lean programs with demangled names using samply and Firefox Profiler. Use when the user asks to profile a Lean binary or investigate performance.
allowed-tools
Bash, Read, Glob, Grep
# Profiling Lean Programs Full documentation: `script/PROFILER_README.md`. ## Quick Start ```bash script/lean_profile.sh ./build/release/stage1/bin/lean some_file.lean ``` Requires `samply` (`cargo install samply`) and `python3`. ## Agent Notes - The pipeline is interactive (serves to browser at the end). When running non-interactively, run the steps manually instead of using the wrapper script. - The three steps are: `samply record --save-only`, `symbolicate_profile.py`, then `serve_profile.py`. - `lean_demangle.py` works standalone as a stdin filter (like `c++filt`) for quick name lookups. - The `--raw` flag on `lean_demangle.py` gives exact demangled names without postprocessing (keeps `._redArg`, `._lam_0` suffixes as-is). - Use `PROFILE_KEEP=1` to keep the temp directory for later inspection. - The demangled profile is a standard Firefox Profiler JSON. Function names live in `threads[i].stringArray`, indexed by `threads[i].funcTable.name`.
Ver no GitHub