Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.42k stars 209 forks source link

[Feature] Measure Retrieve data #1393

Closed luanfreitasdev closed 5 months ago

luanfreitasdev commented 5 months ago

⚡ PowerGrid - Pull Request

Welcome and thank you for your interest in contributing to our project!. You must use this template to submit a Pull Request or it will not be accepted.


Motivation

Description

This feature measures the data retrieval processing in milliseconds and queries that PowerGrid runs.

Note: The data reported in the MeasureRetrieveData classes must be used in conjunction with other metrics and must not be used to make a final decision about the overall processing size, as this may imply server capacity, visualization rendering time, etc.

// * Add a listener to the service provider to listen to the event.

Event::listen(MeasureRetrieveData::class, function (MeasureRetrieveData $measureRetrieveData) {
       ds($measureRetrieveData);
 });
image

Related Issue(s): #1297 , #1389 .

Documentation

This PR requires Documentation update?

luanfreitasdev commented 5 months ago

Added Laravel Pulse Card:

// config/pulse.php:
\PowerComponents\LivewirePowerGrid\Recorders\PowerGridRecorder::class => [
    'enabled' => true,
],

<livewire:powergrid-measurement-card />

image