],
],
],
];
} $this->
getContainer()->
get('rule.repository'
) ->
create($rulePayload,
$this->context->
getContext());
// this will update the rule ids inside the context
$this->
getContainer()->
get(CartRuleLoader::
class)->
loadByToken($this->context, 'bench'
);
} #[BeforeMethods(['setup'])]
#[AfterMethods(['tearDown'])]
#[Bench\Assert('mode(variant.time.avg) < 120ms +/- 10ms')]
public function bench_searching_with_1500_active_rules(): void
{ $request = Request::
create('/search?search=Simple', 'GET',
['search' => 'Simple'
]);
$request->attributes->
set(PlatformRequest::ATTRIBUTE_SALES_CHANNEL_CONTEXT_OBJECT,
$this->context
);
$request->attributes->
set(RequestTransformer::STOREFRONT_URL, 'localhost'
);