(c: &mut Criterion)
| 635 | } |
| 636 | |
| 637 | fn bench_definition(c: &mut Criterion) { |
| 638 | let runtime = rt(); |
| 639 | let source = r#"<?php |
| 640 | class DefTarget { |
| 641 | public function action(): void {} |
| 642 | } |
| 643 | $dt = new DefTarget(); |
| 644 | $dt->action(); |
| 645 | "#; |
| 646 | let backend = Backend::new_test(); |
| 647 | let uri = runtime.block_on(open_file(&backend, "file:///bench_def.php", source)); |
| 648 | |
| 649 | c.bench_function("goto_definition_method", |b| { |
| 650 | b.iter(|| runtime.block_on(fire_definition(&backend, &uri, 5, 7))) |
| 651 | }); |
| 652 | } |
| 653 | |
| 654 | // ─── Parse & reparse benchmarks ──────────────────────────────────────────── |
| 655 |
nothing calls this directly
no test coverage detected