1.2. Run the checked-in example
Run the checked-in version of this experiment from the repository root:
LEAN_PROFILE=1 lake exe leanprofiler_nested_example
It records this pair three times:
example.source-indexer ├── source.read └── source.analyze
The read span records its phase and filesystem activity. The analysis span records its phase and component name. Step numbers remain on individual trace events, while the three repeated calls share one summary row. The timeline preserves each observation; the summary provides the distribution used for comparisons.
The other examples cover two boundaries that are easy to miss:
LEAN_PROFILE=1 lake exe leanprofiler_async_example LEAN_PROFILE=1 lake exe leanprofiler_schedule_example
AsyncCompletion waits for a task through a completion hook before taking the stop timestamp.
ScheduledSteps runs skipped and warmup work before opening the recorded interval. Reach for these
examples after a first capture points to asynchronous completion or startup effects.