• Introducing Swift Profile Recorder: Identifying Performance Bottlenecks in Production Swift Profile Recorder, an in-process sampling profiler for Swift services, is now available as an open source project. • Profiling is a powerful technique for understanding the performance, resource usage, and behavior of your applications. • With Swift Profile Recorder, profiling can now be added to your Swift services by simply adding a package dependency and no additional setup. • 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.
Article Summaries:
- Apple has released Swift Profile Recorder, an open‑source, in‑process sampling profiler for Swift services. The tool can be added via a Swift package dependency and requires no extra system components or privileges, making it usable in permission‑constrained environments on macOS and Linux. Profiling data is exposed through a simple HTTP endpoint and can be exported in common formats such as Linux perf script, pprof, and FlameGraph’s collapsed format, allowing integration with existing visualization tools. Apple has employed the recorder at scale for its Swift‑based server infrastructure, complementing other Apple and community profilers like swift‑parca.
Sources: