From 16fef9c08b9a63ac0b96f8453524b67ed6e50ee2 Mon Sep 17 00:00:00 2001 From: David Badura Date: Fri, 15 Dec 2023 15:10:34 +0100 Subject: [PATCH] add more benchmarks --- tests/Benchmark/SimpleSetupBench.php | 9 +++++++++ tests/Benchmark/SplitStreamBench.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/Benchmark/SimpleSetupBench.php b/tests/Benchmark/SimpleSetupBench.php index a2c2078ae..9514e3fde 100644 --- a/tests/Benchmark/SimpleSetupBench.php +++ b/tests/Benchmark/SimpleSetupBench.php @@ -93,4 +93,13 @@ public function benchSave10000Events(): void $this->repository->save($profile); } + + #[Bench\Revs(1)] + public function benchSave10000Aggregates(): void + { + for ($i = 1; $i < 10_000; $i++) { + $profile = Profile::create(ProfileId::generate(), 'Peter'); + $this->repository->save($profile); + } + } } diff --git a/tests/Benchmark/SplitStreamBench.php b/tests/Benchmark/SplitStreamBench.php index cc90efd82..2ebaeb7ee 100644 --- a/tests/Benchmark/SplitStreamBench.php +++ b/tests/Benchmark/SplitStreamBench.php @@ -99,7 +99,7 @@ public function benchLoad10000Events(): void } #[Bench\Revs(20)] - public function benchWrite10000Events(): void + public function benchSave10000Events(): void { $profile = Profile::create(ProfileId::generate(), 'Peter');