I am currently using the library xhproffor forked tideways.io to perform profiling myscript.php. From xhprofI can get walltime, cputime, memoryusageand peakmemoryusage. I am trying to test the symfony console - so I am adding TIDEWAYS_ENABLE()on my own ConsoleCommandEventand TIDEWAYS_DISABLEon ConsoleTerminateEvent.
Questions:
- How can I determine if
myscript.php, how many percent of the processor is consuming ? Can I just calculate the percentage cpuusage = cputime / realtimeas indicated here on serverfault ? - Given
memoryusage (mu)and peakmemoryusage (pmu)from xhprofprofiler, how do I convert or calculate its use ram? (the topresult is much higher than memoryusage, but somehow close to the value peakmemoryusage, so can I say that the ramvalue is used peakmemoryusage?
Notes:
source
share