| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | public function actionTrim(): int |
||
| 63 | { |
||
| 64 | echo Craft::t('webperf', 'Trimming data samples').PHP_EOL; |
||
| 65 | $affectedRows = Webperf::$plugin->dataSamples->trimDataSamples($this->limit); |
||
| 66 | echo Craft::t( |
||
| 67 | 'webperf', |
||
| 68 | 'Trimmed {rows} from webperf_data_samples table', |
||
| 69 | ['rows' => $affectedRows] |
||
| 70 | ).PHP_EOL; |
||
| 71 | echo Craft::t('webperf', 'Trimming error samples').PHP_EOL; |
||
| 72 | $affectedRows = Webperf::$plugin->errorSamples->trimErrorSamples($this->limit); |
||
| 73 | echo Craft::t( |
||
| 74 | 'webperf', |
||
| 75 | 'Trimmed {rows} from webperf_error_samples table', |
||
| 76 | ['rows' => $affectedRows] |
||
| 77 | ).PHP_EOL; |
||
| 78 | |||
| 79 | return 0; |
||
| 80 | } |
||
| 82 |