Commit 06208bb
authored
fix(bench): attribute unified walk time to per-phase timers (#858)
* fix(bench): attribute unified walk time to per-phase timers
The analysis engine runs AST/complexity/CFG/dataflow visitors in a
single DFS walk, then delegates to buildXxx functions for DB writes.
The walk time was stored in a hidden _unifiedWalkMs field while the
reported phase timers only captured the DB-write tail. This made WASM
1-file incremental benchmarks show ~0ms for CFG/dataflow/complexity
(the real work was done in the unified walk but never attributed).
Now each file's walk time is distributed proportionally among active
visitors, and delegateToBuildFunctions accumulates (+=) rather than
overwrites (=) so both walk + DB-write time are captured.
* fix(bench): clarify timing comments per review feedback
- Change "proportionally" to "equally" in walk-distribution comment
- Document that _unifiedWalkMs includes setupVisitors overhead and
overlaps with per-phase timers (not an additive bucket)
- Add JSDoc to _unifiedWalkMs field in AnalysisTiming interface1 parent 54ba5c0 commit 06208bb
2 files changed
+33
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
| 654 | + | |
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
702 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
703 | 706 | | |
704 | 707 | | |
705 | 708 | | |
| |||
714 | 717 | | |
715 | 718 | | |
716 | 719 | | |
| 720 | + | |
717 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
718 | 736 | | |
719 | 737 | | |
720 | 738 | | |
| |||
727 | 745 | | |
728 | 746 | | |
729 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
730 | 752 | | |
731 | 753 | | |
732 | 754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
669 | 675 | | |
670 | 676 | | |
671 | 677 | | |
| |||
0 commit comments