jmgq / php-a-star

A* (A Star) search algorithm for PHP
MIT License
64 stars 18 forks source link

Measure memory usage in the benchmark #15

Open jmgq opened 3 years ago

jmgq commented 3 years ago

As suggested by @pathway in #12, it would be interesting to include a memory usage report in the benchmark results. The event returned by the stopwatch in BenchmarkRunner.php allows you to get the maximum memory usage with the following method: $event->getMemory(). Unfortunately, I couldn't make it work properly, as it always returned the exact same amount, so a different approach may be needed.