[HttpKernel][Profiler] Add arg value resolver category in performances panel

This commit is contained in:
Maxime Steinhausser 2018-05-13 21:20:33 +02:00
parent 55def78682
commit b24e0543e0
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@
'event_listener': '#00B8F5',
'template': '#66CC00',
'doctrine': '#FF6633',
'controller.argument_value_resolver': '#8c5de6',
} %}
{% endif %}

View File

@ -38,7 +38,7 @@ final class TraceableValueResolver implements ArgumentValueResolverInterface
public function supports(Request $request, ArgumentMetadata $argument): bool
{
$method = \get_class($this->inner).'::'.__FUNCTION__;
$this->stopwatch->start($method);
$this->stopwatch->start($method, 'controller.argument_value_resolver');
$return = $this->inner->supports($request, $argument);
@ -53,7 +53,7 @@ final class TraceableValueResolver implements ArgumentValueResolverInterface
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
$method = \get_class($this->inner).'::'.__FUNCTION__;
$this->stopwatch->start($method);
$this->stopwatch->start($method, 'controller.argument_value_resolver');
yield from $this->inner->resolve($request, $argument);