Bitrix API

SqlTracker implements Iterator

Table of Contents

Interfaces

Iterator

Methods

__construct()  : mixed
addTime()  : void
Used by SqlTrackerQuery to track overall execution time.
current()  : mixed
Part of Iterator implementation made for backward compatibility.
getCounter()  : int
Returns number of queries executed.
getDepthBackTrace()  : int
Returns backtrace depth for writing into log.
getNewTrackerQuery()  : SqlTrackerQuery
Creates new instance of SqlTrackerQuery object.
getQueries()  : array<string|int, SqlTrackerQuery>
Returns array of SqlTrackerQuery objects so far collected.
getTime()  : float
Returns overall queries time execution.
key()  : mixed
Part of Iterator implementation made for backward compatibility.
next()  : void
Part of Iterator implementation made for backward compatibility.
reset()  : void
Clears all queries collected and resets execution time.
rewind()  : void
Part of Iterator implementation made for backward compatibility.
setDepthBackTrace()  : void
Sets backtrace depth for writing into log.
startFileLog()  : void
Starts writing queries into log file.
stopFileLog()  : void
Stops writing queries into log file.
valid()  : bool
Part of Iterator implementation made for backward compatibility.
writeFileLog()  : void
Writes query text and part of backtrace into log file.

Methods

addTime()

Used by SqlTrackerQuery to track overall execution time.

public addTime(float $time) : void
Parameters
$time : float

Time in seconds.

current()

Part of Iterator implementation made for backward compatibility.

public current() : mixed

getCounter()

Returns number of queries executed.

public getCounter() : int
Return values
int

getDepthBackTrace()

Returns backtrace depth for writing into log.

public getDepthBackTrace() : int
Return values
int

getTime()

Returns overall queries time execution.

public getTime() : float
Return values
float

key()

Part of Iterator implementation made for backward compatibility.

public key() : mixed

next()

Part of Iterator implementation made for backward compatibility.

public next() : void

reset()

Clears all queries collected and resets execution time.

public reset() : void

rewind()

Part of Iterator implementation made for backward compatibility.

public rewind() : void

setDepthBackTrace()

Sets backtrace depth for writing into log.

public setDepthBackTrace(int $depthBackTrace) : void
Parameters
$depthBackTrace : int

Desired backtrace depth.

startFileLog()

Starts writing queries into log file.

public startFileLog(string $filePath) : void
Parameters
$filePath : string

Absolute file path.

Tags
see

\Bitrix\Main\Diag\SqlTracker->stopFileLog

see

\Bitrix\Main\Diag\SqlTracker->writeFileLog

stopFileLog()

Stops writing queries into log file.

public stopFileLog() : void
Tags
see

\Bitrix\Main\Diag\SqlTracker->startFileLog

see

\Bitrix\Main\Diag\SqlTracker->writeFileLog

valid()

Part of Iterator implementation made for backward compatibility.

public valid() : bool
Return values
bool

writeFileLog()

Writes query text and part of backtrace into log file.

public writeFileLog(string $sql[, float $executionTime = 0.0 ][, string $additional = "" ][, int $traceSkip = 2 ]) : void
Parameters
$sql : string

Query to be dumped.

$executionTime : float = 0.0

Query time.

$additional : string = ""

Additional info string to be added to header.

$traceSkip : int = 2

How many backtrace frames to skip in output.

Tags
see

\Bitrix\Main\Diag\SqlTracker->startFileLog

see

\Bitrix\Main\Diag\SqlTracker->stopFileLog


        
On this page

Search results