Roadmap Start learning
QD09AdvancedQuant DeveloperMedium
Testing, Profiling and Debugging
Unit and integration tests, debuggers, benchmarks, memory profiling and latency measurement.
1.3 h of lessons~47 min of practice across 3 problems
Prerequisites not done
Lessons0 / 5 lessons
Mastery · target 80%0 / 3 solved
Completing the lessons finishes the module. Mastery also needs 80% of its problems solved.
What you will be able to do
- Write unit and integration tests for numerical and event-driven code
- Debug crashes and memory errors with a debugger and sanitizers
- Benchmark code without being fooled by noise and warm-up
- Measure latency distributions and report percentiles
Before you start
Prerequisites: this module uses their material directly.
Helpful but not essential.
Lessons
1.Unit and Integration TestingStructure tests as a pyramid, make event-driven trading components testable by injecting time and inputs, and lock down whole-system behaviour with deterministic replay and golden-file tests.16m2.DebuggingDebug methodically: reproduce, minimise, bisect, then inspect with a debugger and catch memory and undefined-behaviour bugs with sanitizers.17m3.BenchmarkingMeasure code speed without being fooled: warm up, repeat, report robust statistics, compare with a significance test, and stop the compiler from deleting the code you are timing.15m4.Memory ProfilingTell leaks from unbounded growth, know what heap profilers such as massif and heaptrack show, count allocations in C++, and find a growing structure in Python with tracemalloc.14m5.Latency AnalysisReport latency as percentiles, understand tail latency and fan-out, store distributions in HDR-style histograms, avoid coordinated omission, and timestamp a trading pipeline stage by stage.17m
Practice problems (3)
Where this module fits
- Quant Developer: Recommended; required for Low-Latency C++; required for Python Research Engineering; required for Quant Platform Engineering