Skip to content
PHP Ecosystem
Explore

NPlusOneFinding

API reference › Debug Core › Panel › Db › NPlusOneFinding

final readonly classPHPForge\Debug\Panel\Db\NPlusOneFinding
Sourcesrc/Panel/Db/NPlusOneFinding.php

Potential N+1 query group sharing one captured call-site fingerprint.

PropertyTypeDescriptionDefined by
$count readonly constructorpositive-intNumber of observed query occurrences.NPlusOneFinding
$fingerprint readonly constructornon-empty-stringStable backtrace fingerprint.NPlusOneFinding
$firstSequence readonly constructorintFirst query sequence used as the deep-link target.NPlusOneFinding
$representativeQuery readonly constructorstringStatement shown as the sample of the group.NPlusOneFinding
$sequences readonly constructorlist<int>Query sequences belonging to the group.NPlusOneFinding
$totalDuration readonly constructorfloatTotal group duration in milliseconds.NPlusOneFinding
MethodDescriptionDefined by
__construct()Creates a potential N+1 query finding.NPlusOneFinding
id()Returns the stable DOM id the queries grid deep-links the group with.NPlusOneFinding
public function __construct(non-empty-string $fingerprint, positive-int $count, float $totalDuration, int $firstSequence, list<int> $sequences, string $representativeQuery)

Creates a potential N+1 query finding.

Parameters

ParameterTypeDescription
$fingerprintnon-empty-stringStable backtrace fingerprint.
$countpositive-intNumber of observed query occurrences.
$totalDurationfloatTotal group duration in milliseconds.
$firstSequenceintFirst query sequence used as the deep-link target.
$sequenceslist<int>Query sequences belonging to the group.
$representativeQuerystringStatement shown as the sample of the group.
public function id(): string

Returns the stable DOM id the queries grid deep-links the group with.

Returns

string: DOM id derived from the first query sequence of the group.