Run complete profiling workflow
(self)
| 589 | return False |
| 590 | |
| 591 | def run(self) -> int: |
| 592 | """Run complete profiling workflow""" |
| 593 | # Step 0: Ensure Docker is running (if needed) |
| 594 | if not self.ensure_docker_running(): |
| 595 | return 1 |
| 596 | |
| 597 | # Step 1: Generate profiler |
| 598 | if not self.generate_profiler(): |
| 599 | return 1 |
| 600 | |
| 601 | # Step 2: Build profiler |
| 602 | if not self.build_profiler(): |
| 603 | return 1 |
| 604 | |
| 605 | # Step 3: Run benchmarks (skipped for Docker+callgrind) |
| 606 | if not self.run_benchmark(): |
| 607 | return 1 |
| 608 | |
| 609 | # Step 4: Analyze results (skip for Docker+callgrind mode) |
| 610 | if not (self.use_docker and self.use_callgrind): |
| 611 | if not self.analyze_results(): |
| 612 | return 1 |
| 613 | |
| 614 | # Step 5: Optional callgrind analysis |
| 615 | if self.use_callgrind: |
| 616 | if not self.run_callgrind(): |
| 617 | print("Warning: Callgrind analysis failed (continuing anyway)") |
| 618 | |
| 619 | print("\n✅ Profiling complete!") |
| 620 | return 0 |
| 621 | |
| 622 | |
| 623 | def main() -> int: |