Ruby Test Impact Analysis
How we built a Ruby library that saves 50% in testing time | Datadog

How we built a Ruby library that saves 50% in testing time | Datadog

11/1/2024 · Andrey Marchenko, Gillian McGarvey

What this post added

This post details the development of a Ruby library for test impact analysis. It covers the exploration of existing solutions (Ruby's Coverage module and TracePoint) and their limitations (performance overhead, compatibility issues). The core contribution is the creation of a custom solution by leveraging Ruby's C extension API to hook into interpreter events (RUBY_EVENT_LINE). This custom approach significantly reduced performance overhead (60-80%) compared to previous methods and was released as a native extension. The post also touches on initial optimizations to reduce string transformation overhead.

Read the original post ↗