[erlang-questions] Newbie questions about file module

Bjorn Gustavsson bgustavsson@REDACTED
Tue Feb 17 11:10:26 CET 2009


2009/2/12 Ville Silventoinen <ville.silventoinen@REDACTED>:
> Hi,
>
> My second question relates to eprof. I analysed the execution of my program
> (copying /usr/local/lib to NFS directory). The eprof:total_analyse/0 results
> are below ("mirror11" is my module). It shows that 82% of the time goes in
> file_name_1/1, which "Generates a flat file name from a deep list of atoms
> and characters (integers)". Does this really mean that 82% of time is spent
> here, instead of doing disk I/O? I would have expected file:copy/2 to be on
> the top of the list. (There are 481 directories and 6744 files in my
> /usr/local/lib.)
>

Unless you specifically included the file_server_2 process in the set
of processes
to profile, you are only profiling the time spent in your own
processes and not code
that is executed in other processes. (And since I don't see no calls
from the file_server or prim_file
module in the output from eprof, I assume that you did not include the
file_server_2 process.)

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list