MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/profile_runner.py:623–686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

621
622
623def main() -> int:
624 parser = argparse.ArgumentParser(
625 description="Profile function performance",
626 formatter_class=argparse.RawDescriptionHelpFormatter,
627 epilog="""
628Examples:
629 python ci/profile_runner.py sincos16 --docker
630 python ci/profile_runner.py sincos16 --iterations 50 --build-mode release
631 python ci/profile_runner.py 'fl::Perlin::pnoise2d' --docker --callgrind
632 """,
633 )
634 parser.add_argument("target", help="Function/module to profile")
635 parser.add_argument(
636 "--iterations",
637 type=int,
638 default=20,
639 help="Number of benchmark iterations (default: 20)",
640 )
641 parser.add_argument(
642 "--build-mode",
643 choices=["quick", "debug", "release", "profile"],
644 default="release",
645 help="Build mode (default: release)",
646 )
647 parser.add_argument(
648 "--docker",
649 action="store_true",
650 help="Run in Docker (consistent environment)",
651 )
652 parser.add_argument(
653 "--no-generate",
654 action="store_true",
655 help="Skip test generation (use existing profiler)",
656 )
657 parser.add_argument(
658 "--regenerate",
659 action="store_true",
660 help="Force regeneration of profiler (overwrite existing)",
661 )
662 parser.add_argument(
663 "--callgrind",
664 action="store_true",
665 help="Run callgrind analysis (slower)",
666 )
667 parser.add_argument(
668 "--debuggable",
669 action="store_true",
670 help="Enable stack trace preservation for deadlock debugging (uses 'quick' mode, ~1-5%% slower)",
671 )
672
673 args = parser.parse_args()
674
675 runner = ProfileRunner(
676 target=args.target,
677 iterations=args.iterations,
678 build_mode=args.build_mode,
679 use_docker=args.docker,
680 skip_generate=args.no_generate,

Callers 1

profile_runner.pyFile · 0.70

Calls 3

runMethod · 0.95
ProfileRunnerClass · 0.85
parse_argsMethod · 0.80

Tested by

no test coverage detected