| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/web19/web/wp-content/plugins/w3-total-cache/ |
Upload File : |
<?php
namespace W3TC;
class UsageStatistics_Plugin {
public function run() {
$core = Dispatcher::component( 'UsageStatistics_Core' );
$core->add_shutdown_handler();
// usage default statistics handling
add_action( 'w3tc_usage_statistics_of_request', array(
$this, 'w3tc_usage_statistics_of_request' ), 10, 1 );
add_filter( 'w3tc_usage_statistics_metrics', array(
$this, 'w3tc_usage_statistics_metrics' ) );
}
public function w3tc_usage_statistics_of_request( $storage ) {
$used_100kb = memory_get_peak_usage( true ) / 1024 / 10.24;
$storage->counter_add( 'php_memory_100kb', $used_100kb );
$storage->counter_add( 'php_requests', 1 );
}
public function w3tc_usage_statistics_metrics( $metrics ) {
return array_merge( $metrics, array(
'php_memory_100kb', 'php_requests' ) );
}
}