CppCon 2019 has ended
Back To Schedule
Wednesday, September 18 • 09:35 - 10:05
Minimal Structured Logging for Autonomous Vehicles

Log in to save this to your schedule, view media, leave feedback and see who's attending!

In order to quickly diagnose issues with autonomous vehicles, it is important to produce human readable debug logs for developers, vehicle operators, and triage engineers. The logged format should also allow for easy data aggregation across a large fleet of vehicles. Traditionally, debug logging frameworks that are based on iostream s cannot meet the performance and usability demands of this domain. This talk will describe a fast and efficient structured debug logging framework. This framework can also be incorporated into error handling code, and is easily toolable for offline statistics gathering.

We'll begin with a quick look at debug logging requirements for autonomous vehicles and a review of current debug logging frameworks. Next, we'll discuss the implementation of the Explanation<> class, which is the centerpiece of the debug logging framework and is the actual data type being logged. The data type uses static and constexpr data to efficiently represent a formatted string. It also allows significant performance improvements to be made to the the debug logging framework. The framework enables novel usability improvements, like the ability to efficiently pass around log statements encoded in the Explanation<> type.

Next, we'll compare the performance of this approach to the original logging framework based on iostreams for runtime performance, log size, and toolability. Finally, we will illustrate how the implementation of this library will greatly simplified by C++20.


Robert Keelan

Onboard Code Health Lead, Argo AI
Rob Keelan began his programming career as a Mechanical Engineering PhD student coding biological heat transfer simulations for heterogeneous systems. Rob leads the C++ Code Health team at Argo AI. The team is responsible for maintaining Argo’s standard library, and writing custom... Read More →

Wednesday September 18, 2019 09:35 - 10:05 MDT
Summit 4/5