092a8bc7ce
- Removed all backup/duplicate files - Removed test files from root - Consolidated documentation to /docs/ - Moved scripts to /scripts/ - Renamed f_* directories (removed prefix) - Organized icons and assets - Removed unused vendor directories - Cleaned up redundant config files
29 lines
807 B
PHP
29 lines
807 B
PHP
<?php
|
|
class VPerformance {
|
|
private static $start_time;
|
|
private static $queries = 0;
|
|
|
|
public static function start() {
|
|
self::$start_time = microtime(true);
|
|
}
|
|
|
|
public static function end() {
|
|
$end_time = microtime(true);
|
|
$execution_time = ($end_time - self::$start_time) * 1000;
|
|
|
|
if (isset($_GET['debug'])) {
|
|
echo "<div style=\"position:fixed;bottom:0;right:0;background:#000;color:#fff;padding:10px;z-index:9999;\">
|
|
Execution: {$execution_time}ms | Queries: " . self::$queries . "
|
|
</div>";
|
|
}
|
|
}
|
|
|
|
public static function logQuery() {
|
|
self::$queries++;
|
|
}
|
|
}
|
|
|
|
// Auto-start performance monitoring
|
|
VPerformance::start();
|
|
register_shutdown_function(['VPerformance', 'end']);
|
|
?>
|