class ProductListingRouteBench extends AbstractBenchCase
{ use BasicTestDataBehaviour;
use SalesChannelApiTestBehaviour;
private const SUBJECT_CUSTOMER = 'customer-0';
private const CATEGORY_KEY = 'level-2.1';
public function setupWithLogin(): void
{ $this->ids =
clone Fixtures::
getIds();
$this->context = Fixtures::
context([ SalesChannelContextService::CUSTOMER_ID =>
$this->ids->
get(self::SUBJECT_CUSTOMER
),
]);
if (!
$this->context->
getCustomer() instanceof CustomerEntity
) { throw new \
Exception('Customer not logged in for bench tests which require it!'
);
} $this->
getContainer()->
get(Connection::
class)->
beginTransaction();
} #[Bench\Groups(['custom-pricing'])]
#[Bench\Assert('mean(variant.time.avg) < 35ms')]