已生成 200 个测试文件到 C:\Users\zhou\AppData\Local\Temp\fuscan_multi_rule\files
总字节数: 4320545 (4.12 MB)

================================================================================
=== 场景: S1 内置规则（14 条） ===
================================================================================

=== S1 内置规则（14 条） - perf_summary ===
总耗时: 1446.71ms (1.4467s)
各阶段累计耗时: 117.76ms

阶段                                 总计       占比       调用次数           平均           最大
-----------------------------------------------------------------------------------
match                        111.14ms     7.7%        600       0.19ms       2.89ms
walk                           6.62ms     0.5%          1       6.62ms       6.62ms

扫描文件数: 200
命中规则数: 228
吞吐量: 138.2 files/s

=== cProfile 热点（cumulative time 前 25）===
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    1.447    1.447 scanner.py:523(scan)
        1    0.000    0.000    1.435    1.435 scanner.py:741(scan_entries)
        1    0.000    0.000    1.435    1.435 _pipeline_phase.py:48(run_pipeline_phase)
        1    0.002    0.002    1.435    1.435 _pipeline_phase.py:71(_scan_sequential)
      200    0.001    0.000    1.431    0.007 scanner.py:1228(_scan_entry)
      200    0.003    0.000    1.427    0.007 scanner.py:1261(_scan_entry_uncached)
      200    0.000    0.000    1.295    0.006 _helpers.py:283(default_extract_content)
      200    0.000    0.000    1.295    0.006 base.py:483(extract_content_with_fallback)
      200    0.000    0.000    1.294    0.006 base.py:465(extract_content)
      200    0.001    0.000    1.294    0.006 base.py:275(extract)
      200    0.001    0.000    1.293    0.006 text.py:153(extract)
      200    0.001    0.000    1.277    0.006 pathlib.py:1122(read_bytes)
      200    0.000    0.000    1.264    0.006 pathlib.py:1111(open)
      200    1.264    0.006    1.264    0.006 {built-in method io.open}
      200    0.000    0.000    0.106    0.001 scanner.py:1133(_match_content_via_buckets_impl)
      200    0.056    0.000    0.105    0.001 _content_buckets.py:346(match_content_via_buckets)
      173    0.000    0.000    0.022    0.000 _content_buckets.py:316(_get_active_compiled)
       22    0.000    0.000    0.021    0.001 re.py:249(compile)
       22    0.000    0.000    0.021    0.001 re.py:288(_compile)
     2356    0.001    0.000    0.021    0.000 {built-in method builtins.any}
      173    0.001    0.000    0.021    0.000 _content_buckets.py:293(_compute_active_indices)
       22    0.000    0.000    0.021    0.001 sre_compile.py:783(compile)
     9510    0.019    0.000    0.019    0.000 _content_buckets.py:311(<genexpr>)
      200    0.008    0.000    0.013    0.000 _helpers.py:252(is_minified_content)
      403    0.000    0.000    0.013    0.000 pathlib.py:1092(stat)



=== 重点函数明细（按 fullname 部分匹配）===
函数                                                       ncalls      tottime      cumtime
-----------------------------------------------------------------------------------------
scanner.py:_match_content_via_buckets_impl                  200       0.34ms     105.52ms
_content_buckets.py:match_content_via_buckets               200      55.85ms     105.17ms
_content_buckets.py:_get_active_compiled                    173       0.30ms      21.95ms
_content_buckets.py:_compute_active_indices                 173       1.36ms      20.99ms
_content_buckets.py:<genexpr>                              9510      18.79ms      18.79ms
matchers.py:matches                                         400       0.64ms       2.82ms
matchers.py:matches                                         200       0.68ms       2.18ms
matchers.py:_apply_leaf                                     400       0.38ms       1.78ms
_content_buckets.py:<genexpr>                              2363       1.50ms       1.50ms
matchers.py:_apply_regex                                    400       0.45ms       1.40ms
_helpers.py:build_hit_from_match                            228       0.38ms       0.62ms
matchers.py:evaluate                                        200       0.27ms       0.41ms
matchers.py:_extract_text                                   400       0.18ms       0.18ms
matchers.py:_evaluate_group                                  31       0.02ms       0.02ms
_content_buckets.py:<listcomp>                               22       0.02ms       0.02ms

================================================================================
=== 场景: S2 纯 CONTENT REGEX（50 条） ===
================================================================================

=== S2 纯 CONTENT REGEX（50 条） - perf_summary ===
总耗时: 900.85ms (0.9008s)
各阶段累计耗时: 844.85ms

阶段                                 总计       占比       调用次数           平均           最大
-----------------------------------------------------------------------------------
match                        838.37ms    93.1%        200       4.19ms      10.93ms
walk                           6.48ms     0.7%          1       6.48ms       6.48ms

扫描文件数: 200
命中规则数: 268
吞吐量: 222.0 files/s

=== cProfile 热点（cumulative time 前 25）===
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.901    0.901 scanner.py:523(scan)
        1    0.000    0.000    0.889    0.889 scanner.py:741(scan_entries)
        1    0.000    0.000    0.889    0.889 _pipeline_phase.py:48(run_pipeline_phase)
        1    0.001    0.001    0.889    0.889 _pipeline_phase.py:71(_scan_sequential)
      200    0.001    0.000    0.886    0.004 scanner.py:1228(_scan_entry)
      200    0.002    0.000    0.883    0.004 scanner.py:1261(_scan_entry_uncached)
      200    0.001    0.000    0.837    0.004 scanner.py:1133(_match_content_via_buckets_impl)
      200    0.693    0.003    0.837    0.004 _content_buckets.py:346(match_content_via_buckets)
      173    0.000    0.000    0.098    0.001 _content_buckets.py:316(_get_active_compiled)
       41    0.000    0.000    0.098    0.002 re.py:249(compile)
       41    0.001    0.000    0.098    0.002 re.py:288(_compile)
       41    0.000    0.000    0.097    0.002 sre_compile.py:783(compile)
       41    0.000    0.000    0.048    0.001 sre_parse.py:944(parse)
  1299/41    0.002    0.000    0.048    0.001 sre_parse.py:436(_parse_sub)
       41    0.000    0.000    0.048    0.001 sre_compile.py:622(_code)
 2364/687    0.018    0.000    0.047    0.000 sre_parse.py:494(_parse)
  4361/41    0.013    0.000    0.046    0.001 sre_compile.py:87(_compile)
      173    0.003    0.000    0.038    0.000 _content_buckets.py:293(_compute_active_indices)
     8066    0.002    0.000    0.038    0.000 {built-in method builtins.any}
    23205    0.032    0.000    0.032    0.000 _content_buckets.py:311(<genexpr>)
      200    0.000    0.000    0.029    0.000 _helpers.py:283(default_extract_content)
      200    0.000    0.000    0.029    0.000 base.py:483(extract_content_with_fallback)
      200    0.000    0.000    0.029    0.000 base.py:465(extract_content)
      200    0.000    0.000    0.029    0.000 base.py:275(extract)
      200    0.001    0.000    0.027    0.000 text.py:153(extract)



=== 重点函数明细（按 fullname 部分匹配）===
函数                                                       ncalls      tottime      cumtime
-----------------------------------------------------------------------------------------
scanner.py:_match_content_via_buckets_impl                  200       0.53ms     837.44ms
_content_buckets.py:match_content_via_buckets               200     692.87ms     836.91ms
_content_buckets.py:_get_active_compiled                    173       0.31ms      98.36ms
_content_buckets.py:_compute_active_indices                 173       3.14ms      37.64ms
_content_buckets.py:<genexpr>                             23205      32.46ms      32.46ms
_content_buckets.py:<genexpr>                              4511       3.24ms       3.24ms
_helpers.py:build_hit_from_match                            268       0.33ms       0.57ms
_content_buckets.py:<listcomp>                               41       0.07ms       0.07ms

================================================================================
=== 场景: S3 AND 组合（50 条 × 2~3 CONTENT 子项） ===
================================================================================

=== S3 AND 组合（50 条 × 2~3 CONTENT 子项） - perf_summary ===
总耗时: 497.18ms (0.4972s)
各阶段累计耗时: 427.14ms

阶段                                 总计       占比       调用次数           平均           最大
-----------------------------------------------------------------------------------
match                        420.50ms    84.6%      10000       0.04ms      10.30ms
walk                           6.64ms     1.3%          1       6.64ms       6.64ms

扫描文件数: 200
命中规则数: 5
吞吐量: 402.3 files/s

=== cProfile 热点（cumulative time 前 25）===
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.497    0.497 scanner.py:523(scan)
        1    0.000    0.000    0.485    0.485 scanner.py:741(scan_entries)
        1    0.000    0.000    0.485    0.485 _pipeline_phase.py:48(run_pipeline_phase)
        1    0.001    0.001    0.485    0.485 _pipeline_phase.py:71(_scan_sequential)
      200    0.001    0.000    0.483    0.002 scanner.py:1228(_scan_entry)
      200    0.009    0.000    0.481    0.002 scanner.py:1261(_scan_entry_uncached)
    10000    0.011    0.000    0.413    0.000 matchers.py:649(matches)
    10000    0.002    0.000    0.395    0.000 matchers.py:583(evaluate)
       67    0.386    0.006    0.392    0.006 matchers.py:537(_evaluate_group)
      200    0.000    0.000    0.022    0.000 _helpers.py:283(default_extract_content)
      200    0.000    0.000    0.022    0.000 base.py:483(extract_content_with_fallback)
      200    0.000    0.000    0.022    0.000 base.py:465(extract_content)
      200    0.000    0.000    0.022    0.000 base.py:275(extract)
      200    0.000    0.000    0.021    0.000 text.py:153(extract)
    20002    0.003    0.000    0.014    0.000 {built-in method builtins.next}
    10001    0.002    0.000    0.014    0.000 contextlib.py:139(__exit__)
      200    0.007    0.000    0.012    0.000 _helpers.py:252(is_minified_content)
    20002    0.005    0.000    0.012    0.000 perf.py:405(measure)
      200    0.000    0.000    0.010    0.000 pathlib.py:1122(read_bytes)
      403    0.000    0.000    0.009    0.000 pathlib.py:1092(stat)
      403    0.009    0.000    0.009    0.000 {built-in method nt.stat}
        1    0.000    0.000    0.007    0.007 scanner.py:561(collect_entries)
        1    0.000    0.000    0.005    0.005 scanner.py:546(filter_entries)
        1    0.000    0.000    0.005    0.005 _filter_phase.py:54(run_filter_phase)
    10001    0.002    0.000    0.005    0.000 contextlib.py:279(helper)



=== 重点函数明细（按 fullname 部分匹配）===
函数                                                       ncalls      tottime      cumtime
-----------------------------------------------------------------------------------------
matchers.py:matches                                       10000      10.63ms     412.68ms
matchers.py:evaluate                                      10000       1.85ms     394.92ms
matchers.py:_evaluate_group                                  67     386.01ms     392.45ms
matchers.py:<genexpr>                                      3100       3.88ms       3.88ms
matchers.py:is_compiled                                   10980       0.86ms       0.86ms
matchers.py:<genexpr>                                       744       0.46ms       0.46ms
_helpers.py:build_hit_from_match                              5       0.01ms       0.01ms
matchers.py:_dedup_preserve_order                             5       0.01ms       0.01ms

================================================================================
=== 场景对比 ===
场景                                                    耗时(s)       文件/秒        命中数
--------------------------------------------------------------------------------
S1 内置规则（14 条）                                        1.4467      138.2        228
S2 纯 CONTENT REGEX（50 条）                             0.9008      222.0        268
S3 AND 组合（50 条 × 2~3 CONTENT 子项）                     0.4972      402.3          5
