(c: &mut Criterion)
| 408 | } |
| 409 | |
| 410 | fn bench_completion_chained_methods(c: &mut Criterion) { |
| 411 | let runtime = rt(); |
| 412 | let source = r#"<?php |
| 413 | class Builder { |
| 414 | public function a(): self {} |
| 415 | public function b(): self {} |
| 416 | public function c(): self {} |
| 417 | public function d(): self {} |
| 418 | public function e(): self {} |
| 419 | public function finish(): string {} |
| 420 | } |
| 421 | $b = new Builder(); |
| 422 | $b->a()->b()->c()->d()->e()-> |
| 423 | "#; |
| 424 | let backend = Backend::new_test(); |
| 425 | let uri = runtime.block_on(open_file(&backend, "file:///bench_chain.php", source)); |
| 426 | |
| 427 | c.bench_function("completion_5_method_chain", |b| { |
| 428 | b.iter(|| runtime.block_on(fire_completion(&backend, &uri, 11, 30))) |
| 429 | }); |
| 430 | } |
| 431 | |
| 432 | fn bench_cross_file_completion(c: &mut Criterion) { |
| 433 | let runtime = rt(); |
nothing calls this directly
no test coverage detected