ETTrace is an Open
HomeHome > Blog > ETTrace is an Open

ETTrace is an Open

Nov 30, 2023

InfoQ Homepage News ETTrace is an Open-Source Profiler for iOS Aiming to Simplify Performance Optimization

Jun 07, 2023 2 min read

by

Sergio De Simone

Recently open-sourced by Emerge Tools, maker of several analysis tools for iOS apps, ETTrace aims to simplify iOS performance profiling by providing intuitive visualizations and straightforward operation.

ETTrace faces the strong competition of Xcode integrated tile profiler, which is the de facto standard solution for performance optimization of iOS apps. Yet, says Emerge Tools engineer Noah Martin, there is a lot to improve in Xcode Time Profiler:

At Emerge I've talked to many engineers working on large apps and the feedback is all the same: Time Profiler can be flaky and slow. Even getting the screenshots for this article I encountered multiple freezes and needed to force-quit. Symbolication is frequently a problem, with traces being generated and only showing addresses but not function names.

On the contrary, he maintains, ETTrace uses a flame graph to make performance bottlenecks easy to identify and provides an easy-to-use command-line tool that will profile the app running locally. Integrating ETTrace into an iOS app is as easy as linking an Objective-C framework and running ettrace at the command line to start and stop profiling when desired. ETTrace also supports the possibility of starting tracing right after the app has launched by setting the Info.plist ETTraceRunAtStartup key to YES.

The framework is able to record the app stack at fixed intervals in a trace file, which is then used to create a visualization. ETTrace only samples the main thread, which is the most time-sensitive part of an iOS app since it has the responsibility to render the UI and should never block. The traces can then uploaded to a public page on Emerge Tools website to create a Flame Graph. You can also diff two traces to compare two different runs of you app and inspect, for example, how a function has improved or regressed.

Another advantage of ETTrace, says Martin, is it can be integrated in a CI pipeline using Emerge Tools Performance Analysis, which provides performance testing features. As a case study, he mentions the work done as Doordash to reduce their iOS app launch time by 60% identifying and removing the bottlenecks associated to Swift protocol conformance testing.

A Flame graph is a way to visualize hierarchical data which makes it easy to identify the most frequently used code paths. Each node, i.e. function, is represented by a frame whose width represent a relative measure of that function's used CPU time.

ETTrace can be downloaded from GitHub.

Code, deploy, and scale Java your way.Microsoft Azure supports your workload with abundant choices, whether you're working on a Java app, app server, or framework. Learn more.

Writing for InfoQ has opened many doors and increased career opportunities for me. I was able to deeply engage with experts and thought leaders to learn more about the topics I covered. And I can also disseminate my learnings to the wider tech community and understand how the technologies are used in the real world.

I discovered InfoQ's contributor program earlier this year and have enjoyed it since then! In addition to providing me with a platform to share learning with a global community of software developers, InfoQ's peer-to-peer review system has significantly improved my writing. If you’re searching for a place to share your software expertise, start contributing to InfoQ.

I started writing news for the InfoQ .NET queue as a way of keeping up to date with technology, but I got so much more out of it. I met knowledgeable people, got global visibility, and improved my writing skills.

Becoming an editor for InfoQ was one of the best decisions of my career. It has challenged me and helped me grow in so many ways. We'd love to have more people join our team.

InfoQ seeks a full-time Editor-in-Chief to join C4Media's international, always remote team. Join us to cover the most innovative technologies of our time, collaborate with the world's brightest software practitioners, and help more than 1.6 million dev teams adopt new technologies and practices that push the boundaries of what software and teams can deliver!

A round-up of last week's content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

You need to Register an InfoQ account or Login or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Join a community of experts. Sergio De Simone has opened many doors and increased career opportunities Vivian Hu InfoQ's peer-to-peer review system has significantly improved my writing Oghenevwede Emeni got global visibility, and improved my writing skills Edin Kapić best decisions of my career helped me grow in so many ways join our team Thomas Betts full-time Editor-in-Chief The InfoQ Get the most out of the InfoQ experience.