Optimize driver-trace-stats
This Merge Request (MR) introduces several key improvements to the ETL process, threading utilities, and CI dependency management.
-
ETL Process Improvements: The ETL process has been updated to use the ThreadPool for processing pipelines. This change allows for parallelized downloading of artifacts for each trace performance job, effectively eliminating the bottleneck in the process. Additionally, InfluxDB's write API has been updated to use batching, improving its performance.
-
Threading Utilities: A new utility,
SmartThreadPoolExecutor
, has been introduced to enhance thread management. This utility automatically re-raises exceptions that occur inside a thread, making exception handling more transparent and manageable. It also includes athread_exception_handler
decorator for more fine-grained control over exception-protected operations. -
CI Dependency Management: Changes to the
requirements.txt
file, both at the root and in subprojects, now trigger jobs, ensuring that all Python scripts and subprojects maintain their dependencies up-to-date. Moreover, missing rules fordashboard_exporter
in the CI have been added. -
Memory Management: Generators have been adopted in preference to lists in
driver-stats/gitlab
to reduce memory footprint during extensive thread execution. -
Dashboard Fixes: Fix datalinks between panels, fix frame timings timestamps to merge time to
origin/main
, and fix FPS minimum to zero.
Before | After |
---|---|
.5 FPS difference seems huge | Now it is visible, but not overrated |
Real huge variance before. | After: Higher relative differences are still very visible |
The changes in this MR aim to enhance performance, improve memory management, streamline CI dependency handling, and provide better control over exception handling during multithreaded operations.