SilverCart\Dev\DebugTools
Provides some debug helper methods.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class DebugTools
{
- // members
- public static $starttime = NULL;
- public static integer $printCounter = 0;
- // methods
- public static void startTimer()
- public static void clearTimer()
- public static float getTimeDifference()
- public static void printString()
- public static void varExport()
- public static void printTimeDifference()
- public static void printCurrentMemoryUsage()
- public static void getCurrentMemoryUsage()
- public static bool timerIsStarted()
- public static void setStarttime()
- public static float getStarttime()
Members
public
- $printCounter
—
int
Counter of print outputs - $starttime
—
float
Start time of the timer
Methods
public
- clearTimer() — Clears the timer
- getCurrentMemoryUsage() — Returns the current memory usage.
- getStarttime() — Returns the start time
- getTimeDifference() — Returns the current time difference. Timer has to be started with self::startTimer().
- printCurrentMemoryUsage() — Prints the current memory usage.
- printString() — Prints the given string to default output.
- printTimeDifference() — Prints the current time difference to default output. Timer has to be started with self::startTimer().
- setStarttime() — Sets the start time
- startTimer() — Starts the timer to debug some processing durations
- timerIsStarted() — Checks whether the timer is already started
- varExport() — Exports the given var to default output