measurements = []; if ($maxTraceLength === null) { $this->maxTraceLength = self::TRACE_MAX_LENGTH_DEFAULT; } else { $this->maxTraceLength = (int) $maxTraceLength; } $this->currentMeasurementStartTime = null; } public function beginMeasurement() { $this->currentMeasurementStartTime = microtime(true) * 1000; } public function endMeasurement($sql, array $boundValues = null, $discardMostRecentTraceEntries = null) { if ($discardMostRecentTraceEntries === null) { $discardMostRecentTraceEntries = 0; } else { $discardMostRecentTraceEntries = (int) $discardMostRecentTraceEntries; } // get the trace at this point of the program execution $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $this->maxTraceLength); // discard as many of the most recent entries as desired (but always discard at least the current method) for ($i = 0; $i < $discardMostRecentTraceEntries + 1; $i++) { array_shift($trace); } // calculate the duration in milliseconds $duration = (microtime(true) * 1000) - $this->currentMeasurementStartTime; // and finally record the measurement $this->measurements[] = new SimpleMeasurement( $duration, $sql, $boundValues, $trace ); } public function getCount() { return count($this->measurements); } public function getMeasurement($index) { return $this->measurements[$index]; } public function getMeasurements() { return $this->measurements; } public function sort() { usort($this->measurements, function ($a, $b) { /** @var Measurement $a */ /** @var Measurement $b */ return ($b->getDuration() - $a->getDuration()); }); } } __halt_compiler();----SIGNATURE:----elAiHzuW7ZlPlWYuFBsNFRHstpnIYPEYnWJH3QJZSLDP5dAm2zE1FT1WDTED4q4Oc0emitie5590veHHaJ0MEOabJWuJEgvEThq7wdNDZsbHsE+S+/TPTzmP0dNx5di3B1NJBA3CaTc+WmGk2SE4gtXL8IyHA1Y2Gv9Dawcg2H8qxk1y4Oer0/4Qz4cx/NW4HTeGFwT+Ft9TeVu8zgusNHZXV0BSEahSs6KnHV3/hbNuhZnK9eYG7BMs9NDksDWc4NuEpnM0NE4FJSgMGKaUh3xO+md6gn0KjnDIbd4PoOX06w/y+IRcKbZncGwsdV3AbMnI2Vwswu0Ve5p9e2DxrIsEssjgHVMbNCG3pbqetygsoUo2dmRZlpKEgpUjntVtEyURWUGA2GTW2fxQvSTsG5m5feZ5re7O8wCsRcVbdu+1x6fUYshkK0wr2VRdHgFOaenoRtdX3PAbQxu3DOmUtLxWyVTqPVtyKcSyBzDAXlCNBPJ3dowAY9PS8ata0Y2MGcc4Q0/LyPUENrepXsQZ+1w84cwbUipQnyEqvU8DPYejUpV2fhTSpSyhjPVd1E8DP195R0xLKLoFFd906CdiSo8LEkojDmOVurSr4Sp4PZ5fq/+QcUbNl++pYgin4EGlofW9B7n6mAOKI+a6BJszkDGr5YpXtPyLC3lXM6SE+Xs=----ATTACHMENT:----NzA2NTU3MTA0NjY2ODA5MyA4NDAzNTI1MDY0MjkwOTE4IDI4NzYwNTA3MTg1MzY1NTc=