[erlang-questions] About erlang:statistics/1 and timeout values
Thu Apr 23 14:54:24 CEST 2009
Oscar Hellström <oscar@REDACTED> writes:
> mats cronqvist wrote:
>> Oscar Hellström <oscar@REDACTED> writes:
>>> I was looking at statistics in the erlang module and found that
>>> statistics(runtime) and statistics(wall_clock) returns something called
>>> Time_Sinse_Last_Call. I assume that this is "since last call by the
>>> calling process" and not a globally kept value.
>> AFAIK, time since last call is per emulator, not per process. Thus,
>> it is worse than useless.
> Yes, you're right. The call from the spawned process probably happened
> after the call from the shell process. This shows the actual behaviour:
> 29> spawn(fun() -> statistics(wall_clock) end), timer:sleep(10),
> This is sad though, since it really does make it worse than useless.
Making it undocumented would probably be the best. Then at least
people wouldn't waste time trying to figure it out.
More information about the erlang-questions