Ray's Knowledge Base
Unlock

Benchmark dftracer-utils in the Release build tree

PitfallVerified 5 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

Do not time dftracer-utils in build/build-tests. Its CMake cache has DFTRACER_UTILS_DEBUG=ON, and the utils engines ran about 28x slower there (1.2 s against 0.04 s in a back-to-back old-versus-new check), while pandas was unchanged. Memory figures from that tree are not a verdict either.

Cause#

The test build enables the debug option and can also be stale, missing newer performance commits.

Fix#

Run speed and memory benchmarks, including benchmarks/groupby_analyzer_bench.py and the dfanalyzer spike bench, only against the Release tree build/build-bench. Check the cache with grep -E "^CMAKE_BUILD_TYPE|^DFTRACER_UTILS_DEBUG" <dir>/CMakeCache.txt. Rebuild the tree from current HEAD before benchmarking.

Evidence#

A back-to-back old-versus-new check measured about 1.2 s in the debug test tree against 0.04 s in the release tree, while pandas was unchanged.

Also found by searching

  • dftracer-utils benchmark is 28 times slower in build-tests
  • which build tree should I use for speed and memory measurements
  • CMake cache has DFTRACER_UTILS_DEBUG ON during performance test
  • why do benchmark numbers change between test and release builds