Runtime I know how to respond, now if the performance is good, taking into consideration the runtime, I believe it depends more on what your algorithm does, do a complexity analysis and so on.
At the beginning of the algorithm:
$time_start = microtime(true); // Inicializa a variável $time no inicio do seu script
.
.
{seu código aqui}
.
.
$time_end = microtime(true);
$time = $time_end - $time_start;
echo $time; // Te traz o tempo em milissegundos de execução do algorítimo
In a script that took several data from another server, it brought me the runtime of 59s - 65s for example.
Performance can be measured by the amount of loops
, number of recursive functions, number of similar functions that could be grouped, I believe it is worth reading articles on algorithm complexity, which is an engineering / computer science.
Article about algorithm complexity
Resource consumption, there are internal commands on a server (linux, windows, among others) that can be used to analyze the amount of resources consumed during the execution time of a script, unfortunately I do not have much experience in the subject, but there are some questions here on the network that can help.