Minimal Structured Logging for Autonomous Vehicles - Robert Keelan - CppCon 2019

Sdílet
Vložit
  • čas přidán 26. 05. 2024
  • CppCon.org
    -
    Discussion & Comments: / cpp
    -
    Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2019
    -
    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
    Argo AI
    Onboard Code Health Lead
    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 static analysis and refactoring tools. He is particularly interested in using library design and static analysis tools to ensure fast, efficient, and safe code for autonomous vehicles.
    -
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    *-----*
    Register Now For CppCon 2022: cppcon.org/registration/
    *-----*

Komentáře • 5

  • @sarojmahapatra4891
    @sarojmahapatra4891 Před 2 lety +1

    Very interesting presentation! Is the open source of code now available?

  • @denisyaroshevskiy5679
    @denisyaroshevskiy5679 Před 4 lety +1

    Hi!
    I suspect, that linking you list of globals might not be thread safe - at least some knowing people told me that about my similar idea.
    There is this thing, called Deferred dynamic initialisation
    en.cppreference.com/w/cpp/language/initialization
    I'd suggest looking into it.
    Everything else is really nice.

  • @mohammedj2941
    @mohammedj2941 Před rokem

    At 11:09, I didn't understand the rationale behind do while (false). Why not just use braces instead for scoping objects?

    • @jeremyfincher
      @jeremyfincher Před rokem

      It's so the macro expands into a statement which requires a semicolon. If you just used braces for scoping, someone could write `MACRO(x)` without a semicolon and it would compile.

    • @PixelThorn
      @PixelThorn Před rokem

      @@jeremyfincher but why use macros at all?