Performance is typically a very important metric for consumers who are deciding between different web browsing options. Both Microsoft and Google are constantly looking for ways to enhance performance on their Edge and Chrome browsers, respectively. Now, Microsoft has introduced a set of open-source tools called Microsoft-Performance-Tools for Linux-Android to measure browser performance across a variety of systems.
Although the toolset appears to be general-purpose, Microsoft has emphasized that it can be used to monitor and measure browser performance.The trace processing tooling is based on the same methodology that has been used to improve the performance of Windows in the past couple of decades. It can be used to offer more insights into what the OS and the app code are doing at a point in time, and if you want, you can also correlate the traces with Windows Performance Analyzer (WPA). The toolset itself is built on .NET Core and microsoft-performance-toolkit-sdk, which means that it is theoretically supported on any OS that .NET Core supports.
When it comes to Linux, the toolset includes LTTng, perf, and Perfetto. Meanwhile, only Perfetto is supported in Chromium and Android environments. The tracing metrics supported by each individual tool are as follows:
- LTTng (Linux Kernel CPU scheduling, Processes, Threads, Block IO/Disk, Syscalls, File events, etc)
- perf Linux CPU Sampling(cpu-clock)
- Perfetto Android & Chromium (CPU Scheduling, CPU Sampling, CPU Frequency, FTrace, Android Logs, Generic Events / Default Tracks, GPU Counters)
Through the toolset, you can analyze tracing, record traces, enable programmatic access to them, and even integrate it with WPA so that you have a GUI for easier analysis.
Additionally, Microsoft has noted that "any program or GUI on any OS can process events with the Microsoft-Performance-Tools SDK & Linux-Android plugins". As it stands, Microsoft itself is using this toolset to measure performance in Windows Subsystem for Android (WSA), Azure Linux VMs, Windows Subsystem for Linux (WSL2), and its Edge browser on multiple platforms. You can check out the open-source project on GitHub here.