‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TimeTracker\TimeTracker Class Reference
Inheritance diagram for TYPO3\CMS\Core\TimeTracker\TimeTracker:

Public Member Functions

 __construct (bool $isEnabled=true)
 setEnabled (bool $isEnabled=true)
 start (?float $starttime=null)
 push (string $tslabel, string $value='')
 pull (string $content='')
 setTSlogMessage (string $content, string $logLevel=LogLevel::INFO)
 setTSselectQuery (array $data, string $msg='')
 incStackPointer ()
 decStackPointer ()
int getMilliseconds (?float $microtime=null)
int getDifferenceToStarttime (float $microtime=null)
 finish ()
 getParseTime ()
string printTSlog ()

Public Attributes

int $starttime = 0
bool $LR = true
array $printConf
array $wrapError
array $wrapIcon
int $uniqueCounter = 0
array $tsStack = [[]]
int $tsStackLevel = 0
array $tsStackLevelMax = []
array $tsStackLog = []
int $tsStackPointer = 0
array $currentHashPointer = []
int $highlightLongerThan = 0

Protected Member Functions

string fixContent (array &$arr, string $content, string $depthData='', string $vKey='')
 fixCLen (string $c, string $v)
 fw (string $str)
 createHierarchyArray (array &$arr, int $pointer, string $uniqueId)

Protected Attributes

bool $isEnabled = false
float $finishtime = 0

Detailed Description

Frontend Timetracking functions Is used to register how much time is used with operations in TypoScript

Definition at line 31 of file TimeTracker.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\TimeTracker\TimeTracker::__construct ( bool  $isEnabled = true)

Definition at line 95 of file TimeTracker.php.

References TYPO3\CMS\Core\TimeTracker\TimeTracker\$isEnabled.

Member Function Documentation

◆ createHierarchyArray()

TYPO3\CMS\Core\TimeTracker\TimeTracker::createHierarchyArray ( array &  $arr,
int  $pointer,
string  $uniqueId 

Helper function for internal data manipulation

array$arr‪Array (passed by reference) and modified
int$pointer‪Pointer value
string$uniqueId‪Unique ID string
See also

Definition at line 531 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog().

◆ decStackPointer()

TYPO3\CMS\Core\TimeTracker\TimeTracker::decStackPointer ( )

Decreases the stack pointer

See also

Definition at line 231 of file TimeTracker.php.

◆ finish()

TYPO3\CMS\Core\TimeTracker\TimeTracker::finish ( )

Usually called when the page generation and output is prepared.

See also

Definition at line 273 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\getParseTime().

◆ fixCLen()

TYPO3\CMS\Core\TimeTracker\TimeTracker::fixCLen ( string  $c,
string  $v 

Wraps the input content string in green colored span-tags IF the length of the input string exceeds $this->printConf['contentLength'] (or $this->printConf['contentLength_FILE'] if $v == "FILE"

string$c‪The content string
string$vCommand: If "FILE" then $this->printConf['contentLength_FILE'] is used for content length comparison, otherwise $this->printConf['contentLength']

Definition at line 501 of file TimeTracker.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs().

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\fixContent().

◆ fixContent()

string TYPO3\CMS\Core\TimeTracker\TimeTracker::fixContent ( array &  $arr,
string  $content,
string  $depthData = '',
string  $vKey = '' 

Recursively generates the content to display

array$arr‪Array which is modified with content. Reference
string$content‪Current content string for the level
string$depthData‪Prefixed icons for new PM icons
string$vKey‪Seems to be the previous tsStackLog key
‪string Returns the $content string generated/modified. Also the $arr array is modified!

Definition at line 436 of file TimeTracker.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\fixCLen().

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog().

◆ fw()

TYPO3\CMS\Core\TimeTracker\TimeTracker::fw ( string  $str)

Wraps input string in a tag

string$str‪The string to be wrapped

Definition at line 517 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog().

◆ getDifferenceToStarttime()

int TYPO3\CMS\Core\TimeTracker\TimeTracker::getDifferenceToStarttime ( float  $microtime = null)

Gets the difference between a given microtime value and the starting time as milliseconds.

float | null$microtime‪The microtime value - if not set the current time is used
‪int The difference between a given microtime value and starting time as milliseconds

Definition at line 263 of file TimeTracker.php.

References TYPO3\CMS\Core\TimeTracker\TimeTracker\$starttime, and TYPO3\CMS\Core\TimeTracker\TimeTracker\getMilliseconds().

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\getParseTime(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog().

◆ getMilliseconds()

int TYPO3\CMS\Core\TimeTracker\TimeTracker::getMilliseconds ( ?float  $microtime = null)

Gets a microtime value as milliseconds value.

float | null$microtime‪The microtime value - if not set the current time is used
‪int The microtime value as milliseconds value

Definition at line 246 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\getDifferenceToStarttime(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\start().

◆ getParseTime()

TYPO3\CMS\Core\TimeTracker\TimeTracker::getParseTime ( )

◆ incStackPointer()

TYPO3\CMS\Core\TimeTracker\TimeTracker::incStackPointer ( )

Increases the stack pointer

See also

Definition at line 215 of file TimeTracker.php.

References TYPO3\CMS\Core\TimeTracker\TimeTracker\$tsStackPointer.

◆ printTSlog()

◆ pull()

TYPO3\CMS\Core\TimeTracker\TimeTracker::pull ( string  $content = '')

Pulls an element from the TypoScript tracking array

string$content‪The content string generated within the push/pull part.
See also

Definition at line 153 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TypoScript\TemplateService\generateConfig(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\getFromCache(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\INTincScript(), and TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\preparePageContentGeneration().

◆ push()

TYPO3\CMS\Core\TimeTracker\TimeTracker::push ( string  $tslabel,
string  $value = '' 

◆ setEnabled()

TYPO3\CMS\Core\TimeTracker\TimeTracker::setEnabled ( bool  $isEnabled = true)

◆ setTSlogMessage()

◆ setTSselectQuery()

TYPO3\CMS\Core\TimeTracker\TimeTracker::setTSselectQuery ( array  $data,
string  $msg = '' 

Set TSselectQuery - for messages in TypoScript debugger.

array$data‪Query array
string$msg‪Message/Label to attach

Definition at line 195 of file TimeTracker.php.

◆ start()

TYPO3\CMS\Core\TimeTracker\TimeTracker::start ( ?float  $starttime = null)

Sets the starting time

See also

Definition at line 110 of file TimeTracker.php.

References TYPO3\CMS\Core\TimeTracker\TimeTracker\getMilliseconds().

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\getParseTime().

Member Data Documentation

◆ $currentHashPointer

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$currentHashPointer = []

Definition at line 87 of file TimeTracker.php.

◆ $finishtime

float TYPO3\CMS\Core\TimeTracker\TimeTracker::$finishtime = 0

Is set via finish() with the millisecond time when the request handler is finished.

Definition at line 46 of file TimeTracker.php.

◆ $highlightLongerThan

int TYPO3\CMS\Core\TimeTracker\TimeTracker::$highlightLongerThan = 0

Log entries that take than this number of milliseconds (own time) will be highlighted during log display. Set 0 to disable highlighting.

Definition at line 93 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog().

◆ $isEnabled

bool TYPO3\CMS\Core\TimeTracker\TimeTracker::$isEnabled = false

If set to true (see constructor) then timetracking is enabled

Definition at line 36 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\__construct(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\setEnabled().

◆ $LR

bool TYPO3\CMS\Core\TimeTracker\TimeTracker::$LR = true

Log Rendering flag. If set, ->push() and ->pull() is called from the cObj->cObjGetSingle(). This determines whether the TypoScript parsing activity is logged. But it also slows down the rendering.

Definition at line 52 of file TimeTracker.php.

◆ $printConf

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$printConf
Initial value:
= [
'showParentKeys' => true,
'contentLength' => 10000,
'contentLength_FILE' => 400,
'flag_tree' => true,
'flag_messages' => true,
'flag_content' => false,
'allTime' => false,
'keyLgd' => 40,

Definition at line 54 of file TimeTracker.php.

◆ $starttime

int TYPO3\CMS\Core\TimeTracker\TimeTracker::$starttime = 0

Is loaded with the millisecond time when this object is created

Definition at line 41 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\getDifferenceToStarttime().

◆ $tsStack

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$tsStack = [[]]

Definition at line 82 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\push().

◆ $tsStackLevel

int TYPO3\CMS\Core\TimeTracker\TimeTracker::$tsStackLevel = 0

Definition at line 83 of file TimeTracker.php.

Referenced by TYPO3\CMS\Core\TimeTracker\TimeTracker\push().

◆ $tsStackLevelMax

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$tsStackLevelMax = []

Definition at line 84 of file TimeTracker.php.

◆ $tsStackLog

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$tsStackLog = []

Definition at line 85 of file TimeTracker.php.

◆ $tsStackPointer

int TYPO3\CMS\Core\TimeTracker\TimeTracker::$tsStackPointer = 0

◆ $uniqueCounter

int TYPO3\CMS\Core\TimeTracker\TimeTracker::$uniqueCounter = 0

Definition at line 81 of file TimeTracker.php.

◆ $wrapError

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$wrapError
Initial value:
= [
LogLevel::INFO => ['', ''],
LogLevel::NOTICE => ['<strong>', '</strong>'],
LogLevel::WARNING => ['<strong style="color:#ff6600;">', '</strong>'],
LogLevel::ERROR => ['<strong style="color:#ff0000;">', '</strong>'],

Definition at line 67 of file TimeTracker.php.

◆ $wrapIcon

array TYPO3\CMS\Core\TimeTracker\TimeTracker::$wrapIcon
Initial value:
= [
LogLevel::INFO => '',
LogLevel::NOTICE => 'actions-document-info',
LogLevel::WARNING => 'status-dialog-warning',
LogLevel::ERROR => 'status-dialog-error',

Definition at line 74 of file TimeTracker.php.