[erlang-questions] Calculate nanoseconds
Jesper Louis Andersen
Sat Nov 21 16:23:38 CET 2015
You can adapt the source code of timer:tc/1 to use nano_seconds timing
rather than microseconds, but I would be weary you can get accurate timing
at the nanosecond scale by running a single experiment. You would have to
run more rounds and divide in order to figure out what a real timing would
Also, you should collect many samples, and do bootstrapping on the dataset
in order to figure out if the average is a stable number, or if it is
likely to have been perturbed by something.
On Sat, Nov 21, 2015 at 8:23 AM, Felix Gallo <felixgallo@REDACTED> wrote:
> Is a good place to start.
> On Nov 20, 2015 11:18 PM, "Benjamin Adams" <ben@REDACTED> wrote:
>> How would I go about calculating Nanoseconds for a function call. Want
>> to use it for language profiling.
>> Fun() ->......
>> Io:format("nanoseconds: ~p", [Time.stop()]),
>> Something like that.
>> Ben Adams
>> erlang-questions mailing list
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions