(c: &mut Criterion)
| 613 | // ─── Hover & go-to-definition benchmarks ─────────────────────────────────── |
| 614 | |
| 615 | fn bench_hover(c: &mut Criterion) { |
| 616 | let runtime = rt(); |
| 617 | let source = r#"<?php |
| 618 | class HoverTarget { |
| 619 | /** |
| 620 | * Compute a result from the input. |
| 621 | * @param string $input The raw input |
| 622 | * @return int The computed value |
| 623 | */ |
| 624 | public function compute(string $input): int {} |
| 625 | } |
| 626 | $ht = new HoverTarget(); |
| 627 | $ht->compute('test'); |
| 628 | "#; |
| 629 | let backend = Backend::new_test(); |
| 630 | let uri = runtime.block_on(open_file(&backend, "file:///bench_hover.php", source)); |
| 631 | |
| 632 | c.bench_function("hover_method_call", |b| { |
| 633 | b.iter(|| runtime.block_on(fire_hover(&backend, &uri, 10, 7))) |
| 634 | }); |
| 635 | } |
| 636 | |
| 637 | fn bench_definition(c: &mut Criterion) { |
| 638 | let runtime = rt(); |
nothing calls this directly
no test coverage detected