[TYPO3-dev] timer for debugging

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Mar 8 16:57:08 CET 2010


Sigfried Arnold schrieb am 08.03.2010 15:58:
> Am 08.03.2010 12:39, schrieb Ernesto Baschny [cron IT]:
>> There is t3lib/class.t3lib_timetrack.php
> 
> It says: "Is used to register how much time is used with operations in
> TypoScript" - can it simply be used for tracking parsetime in extensions?
> 
> regards
> Sigfried Arnold

If you read the code, there is no dependency on "TS" if you don't need it:

1) start() remembers the start time
2) getDifferenceToStarttime() will get the diff between current and
start time.

You can even use push() and and pull() to stack your benchmarking points
and time recording to be able to output your benchmarks in a form
similar to the admin panel.

And if it is a FE-plugin, you can just use push/pull in your plugins,
using the existing $TT object, so that you will see your benchmarks in
the admin panel. Since every plugin is added via TypoScript, there you
have the only "link" to TypoScript (your plugin is a USER-object).

Cheers,
Ernesto




More information about the TYPO3-dev mailing list