Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepScanPending ¶
func DeepScanPending() string
func LastRefreshStats ¶
func RefreshPending ¶
func RefreshPending() bool
func SetSkipDeepProbes ¶
func SetSkipDeepProbes(v bool)
func TriggerDeepScan ¶
func TriggerDeepScan(site string)
TriggerDeepScan asks the next refresh to also re-walk the docroot filesystem scan for one site (or "*" for all).
func TriggerRefresh ¶
func TriggerRefresh()
TriggerRefresh asks the next Collect() to do a full refresh.
Types ¶
type CallCategory ¶
type CallCategory string
CallCategory groups calls by what they typically represent.
const ( CatFramework CallCategory = "framework" // WP/Laravel/Symfony hook system, autoload CatRender CallCategory = "render" // Elementor / theme rendering CatDB CallCategory = "db" // MySQL/Postgres/Redis client CatHTTP CallCategory = "http" // outbound curl / remote API CatFS CallCategory = "fs" // filesystem reads/writes CatExec CallCategory = "exec" // shell-exec family (DANGEROUS in normal code) CatCrypto CallCategory = "crypto" // hashing, encryption CatImage CallCategory = "image" // GD / Imagick / image-magick CatRegex CallCategory = "regex" // preg_* — can be O(n²) on bad patterns CatSerialize CallCategory = "serialize" // serialize / json_encode for huge structures CatOther CallCategory = "other" )
type CallFnCount ¶
CallFnCount is the input shape — function name + observation count.
type CallInfo ¶
type CallInfo struct {
Function string
Category CallCategory
Severity string // "normal" | "heavy" | "critical"
Explanation string
Optimize string
}
CallInfo carries the classifier output for one function.
func ClassifyCall ¶
ClassifyCall returns the CallInfo for a PHP function name as it appears in the slow-log stack ("shell_exec", "do_action", etc.). Unknown names are returned with Category=CatOther, severity "normal".
type ClassifiedCall ¶
ClassifiedCall is the output for one analyzed function.
func ClassifyTopCalls ¶
func ClassifyTopCalls(calls []CallFnCount) []ClassifiedCall
ClassifyTopCalls runs ClassifyCall on each (fn, count) pair and returns them sorted by severity (critical → heavy → normal), then by count desc. Used to render the analyzed blocking-calls section.
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector() *Collector