I agree with @ndm that Controller::invokeAction() method encapsulates everything that is triggered by the Controller action. Your method did not take much time to execute, but when it sends the resulting data to the client - the time it takes to finish unloading the data gets logged into this method. In New Relic's parlance this is uninstrumented time.
New Relic's Transaction time includes this network time too, which will get logged into Controller::invokeAction() method, because New Relic couldn't find some other action to blame for the untracked time.
According the the New Relic Documentation -
the most frequent culprits are functions that send large blocks of
data or large files to users. If the user is on a slow connection,
sending small files (small images for example) could take a long time
due to simple network latency. Since no internal or C extension
functions are instrumented, the PHP agent has no one to "blame" the
time spent on, and this appears in a transaction trace as
uninstrumented time.
You can read more about it here https://docs.newrelic.com/docs/agents/php-agent/troubleshooting/uninstrumented-time-traces
If you still want to figure out what happened, or trace the uninstrumented time of your method; you can set the newrelic.transaction_tracer.detail
to 0
in your New Relic's PHP Agent. This will ensure maximum visibility.
You can read more about setting up New Relic's PHP custom instrumentation here : https://docs.newrelic.com/docs/agents/php-agent/features/php-custom-instrumentation
Controller::invokeAction()
encapsultes everything that is triggered by your controller action, ie it's impossible for anyone here to tell where the problem is located. – Gravelblind