Swift Profile Recorder
Johannes Weiss and Mitchell Allison (forum):
Swift Profile Recorder, an in-process sampling profiler for Swift services, is now available as an open source project.
[…]
Swift Profile Recorder enables you to:
- Adopt profiling without extra privileges or system dependencies, allowing you to add profiling across a variety of compute environments with constrained permissions.
- Collect samples using
curl
, allowing you to easily read profiler output via an HTTP endpoint without needing to learn specific tooling like perf, sample, DTrace, or eBPF (bpftrace).- Integrate with existing tools for visualization and analysis by supporting multiple industry-standard formats, including Linux perf script format, both the pprof file format as well as the
/debug/pprof/profile
endpoints, and also the collapsed format as used by the original FlameGraphs.Apple has used Swift Profile Recorder at scale for several years as a tool for operating and debugging Swift services in production. Alongside the recent announcement of swift-parca, the Swift server ecosystem now has multiple profiling tools and approaches.
I’m intrigued by the idea of an app being able to profile itself.