Performance Monitoring
NexaModel documentation.
NexaModel · Storage() · NexaDb
$this->Storage('news')->where()->first();Performance Stats
$stats = $this->Storage('users')->getPerformanceStats();
// Isi sesuai implementasi: query_log_count, cache_stats (dari getCacheStats),
// memory_usage, peak_memory (byte)
Query Benchmark
// Benchmark query dengan 10 iterasi (waktu dalam ms)
$benchmark = $this->Storage('users')
->where('status', 'active')
->benchmarkQuery(10);
// Contoh kunci: iterations, avg_time_ms, min_time_ms, max_time_ms, cache_hits, cache_hit_ratio
Health Check
$health = $this->Storage('users')->healthCheck();
// Array berisi antara lain: database_connection (bool), cache_status (false — cache tidak dipakai),
// memory_usage, peak_memory, errors
// Display health check
$this->Storage('users')->showHealth(true); // dengan <pre> tag
Lanjut
Topik sebelumnya: Security Features. Topik berikutnya: Database Management. Lihat juga Models, Events, Helper & template, daftar dokumentasi.