In article <4c5178ae$0$11091$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
>
>> This should be enough
>>
>import time
>tic = time.time()
>function()
>toc = time.time()
>print toc - tic
>
>You're typing that in the i
Albert Hopkins wrote:
On Fri, 2010-07-30 at 14:28 +0200, Hrvoje Niksic wrote:
Steven D'Aprano writes:
On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
This should be enough
import time
tic = time.time()
function()
toc = time.time()
print toc - tic
You're typing that in the interac
On Fri, 2010-07-30 at 14:28 +0200, Hrvoje Niksic wrote:
> Steven D'Aprano writes:
>
> > On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
> >
> >> This should be enough
> >>
> >import time
> >tic = time.time()
> >function()
> >toc = time.time()
> >print toc - tic
> >
>
Steven D'Aprano writes:
> On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
>
>> This should be enough
>>
>import time
>tic = time.time()
>function()
>toc = time.time()
>print toc - tic
>
> You're typing that in the interactive interpreter, which means the
> timer is co
Someone should port Perl's Benchmark.pm module to python that's such a useful
module to measure a functions execution time and CPU usage.
Sent from my iPhone 4.
On Jul 29, 2010, at 3:43 PM, "Benjamin J. Racine" wrote:
> I just use ipython's functions (that are themselves just calls to the tim
I just use ipython's functions (that are themselves just calls to the time
module functions) for timing my functions...
Enter:
%timeit?
or
%time
At the Ipython command prompt to get started.
Ben R.
On Jul 29, 2010, at 7:43 AM, D'Arcy J.M. Cain wrote:
> On Thu, 29 Jul 2010 08:45:23 -0400
> Jo
On Thu, 29 Jul 2010 08:45:23 -0400
Joe Riopel wrote:
> On Thu, Jul 29, 2010 at 8:34 AM, Mahmood Naderan wrote:
> > the output should be 7600 (s) for example. What is the best and easiest way
> > to do that?
>
> Take a look at time.clock()
I don't know if that's what he wants. The clock() metho
PM
Subject: Re: measuring a function time
This should be enough
>>>import time
>>>tic = time.time()
>>>function()
>>>toc = time.time()
>>>print toc - tic
On Thu, Jul 29, 2010 at 2:34 PM, Mahmood Naderan wrote:
> Hi,
> I want to measure a functio
On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
> This should be enough
>
import time
tic = time.time()
function()
toc = time.time()
print toc - tic
You're typing that in the interactive interpreter, which means the timer
is counting the seconds while you're typing s
On Thu, Jul 29, 2010 at 8:34 AM, Mahmood Naderan wrote:
> the output should be 7600 (s) for example. What is the best and easiest way
> to do that?
Take a look at time.clock()
http://docs.python.org/library/time.html#time.clock
"this is the function to use for benchmarking Python or timing algo
This should be enough
>>>import time
>>>tic = time.time()
>>>function()
>>>toc = time.time()
>>>print toc - tic
On Thu, Jul 29, 2010 at 2:34 PM, Mahmood Naderan wrote:
> Hi,
> I want to measure a function run time. I read
> http://docs.python.org/library/time.html but I am confused and don't kno
Hi,
I want to measure a function run time. I read
http://docs.python.org/library/time.html but I am confused and don't know which
one is suitable. I don't know is daylight timing important or not or is Y2K
issue important for my case or not I also don't know how epoch time is
related to
12 matches
Mail list logo