From 1682ed9c08352cd96e96c708de992ac401d3b846 Mon Sep 17 00:00:00 2001 From: Sergey Penkovsky Date: Fri, 1 Aug 2025 08:40:10 +0300 Subject: [PATCH] Update benchmarks, lock files, and related documentation --- benchmark_cherrypick/README.ru.md | 12 ++++++------ .../lib/async_chain_benchmark.dart | 2 ++ .../lib/cherrypick_benchmark.dart | 2 ++ .../lib/complex_bindings_benchmark.dart | 2 ++ .../lib/scope_override_benchmark.dart | 2 ++ .../melos_benchmark_cherrypick.iml | 16 ++++++++++++++++ benchmark_cherrypick/pubspec.lock | 4 ++-- examples/client_app/pubspec.lock | 4 ++-- examples/postly/pubspec.lock | 2 +- pubspec.lock | 14 +++++++------- 10 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 benchmark_cherrypick/melos_benchmark_cherrypick.iml diff --git a/benchmark_cherrypick/README.ru.md b/benchmark_cherrypick/README.ru.md index 9f05492..c47fd66 100644 --- a/benchmark_cherrypick/README.ru.md +++ b/benchmark_cherrypick/README.ru.md @@ -17,12 +17,12 @@ | Сценарий | RunTime (мкс) | |----------------------------------------------------|--------------| -| RegisterAndResolve | 0.1976 | -| ChainSingleton (A->B->C, singleton) | 0.2721 | -| ChainFactory (A->B->C, factory) | 0.6690 | -| NamedResolve (by name) | 0.2018 | -| AsyncChain (A->B->C, async) | 1.2732 | -| ScopeOverride (child overrides parent) | 0.1962 | +| RegisterAndResolve | 0.3407 | +| ChainSingleton (A->B->C, singleton) | 0.3777 | +| ChainFactory (A->B->C, factory) | 0.9688 | +| NamedResolve (by name) | 0.3878 | +| AsyncChain (A->B->C, async) | 1.8006 | +| ScopeOverride (child overrides parent) | 0.3477 | ## Как запускать diff --git a/benchmark_cherrypick/lib/async_chain_benchmark.dart b/benchmark_cherrypick/lib/async_chain_benchmark.dart index a63e790..027ba18 100644 --- a/benchmark_cherrypick/lib/async_chain_benchmark.dart +++ b/benchmark_cherrypick/lib/async_chain_benchmark.dart @@ -26,6 +26,8 @@ class AsyncChainBenchmark extends AsyncBenchmarkBase { @override Future setup() async { + CherryPick.disableGlobalCycleDetection(); + CherryPick.disableGlobalCrossScopeCycleDetection(); scope = CherryPick.openRootScope(); scope.installModules([AsyncChainModule()]); } diff --git a/benchmark_cherrypick/lib/cherrypick_benchmark.dart b/benchmark_cherrypick/lib/cherrypick_benchmark.dart index c6e8a93..8ec01df 100644 --- a/benchmark_cherrypick/lib/cherrypick_benchmark.dart +++ b/benchmark_cherrypick/lib/cherrypick_benchmark.dart @@ -18,6 +18,8 @@ class RegisterAndResolveBenchmark extends BenchmarkBase { @override void setup() { + CherryPick.disableGlobalCycleDetection(); + CherryPick.disableGlobalCrossScopeCycleDetection(); scope = CherryPick.openRootScope(); scope.installModules([AppModule()]); diff --git a/benchmark_cherrypick/lib/complex_bindings_benchmark.dart b/benchmark_cherrypick/lib/complex_bindings_benchmark.dart index 5a021ca..c0f0c19 100644 --- a/benchmark_cherrypick/lib/complex_bindings_benchmark.dart +++ b/benchmark_cherrypick/lib/complex_bindings_benchmark.dart @@ -52,6 +52,8 @@ class ChainFactoryBenchmark extends BenchmarkBase { late Scope scope; @override void setup() { + CherryPick.disableGlobalCycleDetection(); + CherryPick.disableGlobalCrossScopeCycleDetection(); scope = CherryPick.openRootScope(); scope.installModules([ChainFactoryModule()]); } diff --git a/benchmark_cherrypick/lib/scope_override_benchmark.dart b/benchmark_cherrypick/lib/scope_override_benchmark.dart index 7647504..ec1bb96 100644 --- a/benchmark_cherrypick/lib/scope_override_benchmark.dart +++ b/benchmark_cherrypick/lib/scope_override_benchmark.dart @@ -25,6 +25,8 @@ class ScopeOverrideBenchmark extends BenchmarkBase { late Scope child; @override void setup() { + CherryPick.disableGlobalCycleDetection(); + CherryPick.disableGlobalCrossScopeCycleDetection(); parent = CherryPick.openRootScope(); parent.installModules([ParentModule()]); child = parent.openSubScope('child'); diff --git a/benchmark_cherrypick/melos_benchmark_cherrypick.iml b/benchmark_cherrypick/melos_benchmark_cherrypick.iml new file mode 100644 index 0000000..389d07a --- /dev/null +++ b/benchmark_cherrypick/melos_benchmark_cherrypick.iml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/benchmark_cherrypick/pubspec.lock b/benchmark_cherrypick/pubspec.lock index c67642e..355da20 100644 --- a/benchmark_cherrypick/pubspec.lock +++ b/benchmark_cherrypick/pubspec.lock @@ -31,7 +31,7 @@ packages: path: "../cherrypick" relative: true source: path - version: "2.2.0" + version: "3.0.0-dev.1" exception_templates: dependency: transitive description: @@ -57,4 +57,4 @@ packages: source: hosted version: "1.17.0" sdks: - dart: ">=3.5.2 <4.0.0" + dart: ">=3.5.0 <4.0.0" diff --git a/examples/client_app/pubspec.lock b/examples/client_app/pubspec.lock index 91cba2d..bffe068 100644 --- a/examples/client_app/pubspec.lock +++ b/examples/client_app/pubspec.lock @@ -127,7 +127,7 @@ packages: path: "../../cherrypick" relative: true source: path - version: "2.2.0" + version: "3.0.0-dev.1" cherrypick_annotations: dependency: "direct main" description: @@ -141,7 +141,7 @@ packages: path: "../../cherrypick_flutter" relative: true source: path - version: "1.1.2" + version: "1.1.3-dev.1" cherrypick_generator: dependency: "direct dev" description: diff --git a/examples/postly/pubspec.lock b/examples/postly/pubspec.lock index fcba66b..a5c3384 100644 --- a/examples/postly/pubspec.lock +++ b/examples/postly/pubspec.lock @@ -151,7 +151,7 @@ packages: path: "../../cherrypick" relative: true source: path - version: "2.2.0" + version: "3.0.0-dev.1" cherrypick_annotations: dependency: "direct main" description: diff --git a/pubspec.lock b/pubspec.lock index eb70210..89c1b0a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77" + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "73.0.0" + version: "76.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a" + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.8.0" + version: "6.11.0" ansi_styles: dependency: transitive description: @@ -298,10 +298,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" matcher: dependency: transitive description: