Skip to content

Commit

Permalink
add benchmark with transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Dec 15, 2023
1 parent 16fef9c commit 1129cc9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Benchmark/SimpleSetupBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,15 @@ public function benchSave10000Aggregates(): void
$this->repository->save($profile);
}
}

#[Bench\Revs(20)]
public function benchSave10000AggregatesTransaction(): void
{
$this->store->transactional(function (): void {
for ($i = 1; $i < 10_000; $i++) {
$profile = Profile::create(ProfileId::generate(), 'Peter');
$this->repository->save($profile);
}
});
}
}

0 comments on commit 1129cc9

Please sign in to comment.