Get all FastLED-specific headers with their CUMULATIVE compile times. Returns list of (header_name, cumulative_time_ms) tuples sorted by time. Cumulative time includes all nested headers, representing the real cost to users when they #include that header.
(self)
| 237 | return headers |
| 238 | |
| 239 | def get_fastled_headers(self) -> list[tuple[str, float]]: |
| 240 | """ |
| 241 | Get all FastLED-specific headers with their CUMULATIVE compile times. |
| 242 | |
| 243 | Returns list of (header_name, cumulative_time_ms) tuples sorted by time. |
| 244 | Cumulative time includes all nested headers, representing the real cost |
| 245 | to users when they #include that header. |
| 246 | """ |
| 247 | headers = self.get_header_times() |
| 248 | fastled_headers: list[tuple[str, float]] = [] |
| 249 | |
| 250 | for name, info in headers.items(): |
| 251 | path = self._normalize_path(info["path"]) |
| 252 | # Check if it's a FastLED header |
| 253 | if "/src/" in path or "fastled" in path.lower() or name.startswith("fl/"): |
| 254 | fastled_headers.append((name, info["time"])) |
| 255 | |
| 256 | return sorted(fastled_headers, key=lambda x: x[1], reverse=True) |
| 257 | |
| 258 | def get_top_operations(self, n: int = 20) -> list[tuple[str, str, float]]: |
| 259 | """ |
no test coverage detected