TestManager

Timings

Timings checks how long a specific task takes, you can use it like this:

use Saturn\TestManager\Timings;

$Timings = new Timings();
$Timings->Start(); // Starts the timer

// Your task here...

$TimeTaken = $Timings->End(); // Outputs time taken

Profiler

Profiler tells you how many system resources you're currently using.

use Saturn\TestManager\Profiler;

$Profiler = new Profiler();
$Usage = $Profiler->ResourceUsage(); // Returns resource usage

var_dump($Usage['memory']['current']); // Outputs current memory usage.
var_dump($Usage['memory']['peak']); // Outputs peak memory usage.
var_dump($Usage['cpu']); // Outputs CPU usage.

Last updated