[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Monitoring time spent running classes and methods

Mario Ruiz

2/24/2009 10:53:00 AM

I would like to know if there is any way to know how much time my
classes and methods are running. I would like to improve it running the
test cases faster so I need to know which ones should be the first to
improve.

So... my question is... how can I know the running time for every single
method and class? I mean without including in every method a log at the
beginning and end since I have hundreds of them.

Thanks in advance.
--
Posted via http://www.ruby-....

9 Answers

Florian Gilcher

2/24/2009 11:44:00 AM

0


On Feb 24, 2009, at 11:53 AM, Mario Ruiz wrote:

> I would like to know if there is any way to know how much time my
> classes and methods are running. I would like to improve it running
> the
> test cases faster so I need to know which ones should be the first to
> improve.
>
> So... my question is... how can I know the running time for every
> single
> method and class? I mean without including in every method a log at
> the
> beginning and end since I have hundreds of them.
>
> Thanks in advance.
> --
> Posted via http://www.ruby-....
>

I would say: thats highly dependant on the operating system you use.
For example,
on OS X and Solaris, I would suggest to use dtrace for such a task.

Regards,
Florian

--
Florian Gilcher

smtp: flo@andersground.net
jabber: Skade@jabber.ccc.de
gpg: 533148E2


Mario Ruiz

2/24/2009 11:48:00 AM

0

I'm working on Vista


Florian Gilcher wrote:
> On Feb 24, 2009, at 11:53 AM, Mario Ruiz wrote:
>
--
Posted via http://www.ruby-....

Alex Fenton

2/24/2009 11:51:00 AM

0

Mario Ruiz wrote:

> So... my question is... how can I know the running time for every single
> method and class?

Run the script you're interested in tracing with -rprofile

ruby -rprofile how_long_does_this_stuff_take.rb

a

Mario Ruiz

2/24/2009 12:58:00 PM

0

Thanks a lot
Is there any Eclipse plug-in that can do the same?
--
Posted via http://www.ruby-....

JJ

3/28/2013 6:34:00 PM

0


"Shelly" <sheldonlg@thevillages.net> wrote in message
news:kj1u9e$knh$1@dont-email.me...
> On 3/28/2013 11:51 AM, David Makowsky wrote:
>> On Saturday, March 23, 2013 3:03:23 PM UTC-5, Fattush wrote:
>>> Looks like Bibi blinked first and apologized. I'm disgusted.
>>
>>> http://www.ynetnews.com/articles/0,7340,L-43601...
>>
>> The proper response by Netanyahu, and he should have done this right
>> after the incident, would have been to publicly announce (and then follow
>> through if necessary) Israel would provide all necessary aid to Greece to
>> retake Cyprus.
>>
>
> Yeah right. Another example of "let's you and him fight".
>
> --
> Shelly


I like that. My original thought was, "Yes, what we really need is another
regional war" Especially if Israel takes on a member of NATO (Turkey) thus
(under the NATO treaty) bringing all the other NATO members (and the US
happens to be one of them) in to help their ally, Turkey.

Jay



sheldonlg

3/28/2013 7:11:00 PM

0

On 3/28/2013 2:34 PM, JJ wrote:
> "Shelly" <sheldonlg@thevillages.net> wrote in message
> news:kj1u9e$knh$1@dont-email.me...
>> On 3/28/2013 11:51 AM, David Makowsky wrote:
>>> On Saturday, March 23, 2013 3:03:23 PM UTC-5, Fattush wrote:
>>>> Looks like Bibi blinked first and apologized. I'm disgusted.
>>>
>>>> http://www.ynetnews.com/articles/0,7340,L-43601...
>>>
>>> The proper response by Netanyahu, and he should have done this right
>>> after the incident, would have been to publicly announce (and then follow
>>> through if necessary) Israel would provide all necessary aid to Greece to
>>> retake Cyprus.
>>>
>>
>> Yeah right. Another example of "let's you and him fight".
>>
>> --
>> Shelly
>
>
> I like that. My original thought was, "Yes, what we really need is another
> regional war" Especially if Israel takes on a member of NATO (Turkey) thus
> (under the NATO treaty) bringing all the other NATO members (and the US
> happens to be one of them) in to help their ally, Turkey.
>
> Jay

Greece is also a member of NATO.

--
Shelly

JJ

3/28/2013 7:26:00 PM

0

"Shelly" <sheldonlg@thevillages.net> wrote in message
news:kj24eq$pmt$1@dont-email.me...
> On 3/28/2013 2:34 PM, JJ wrote:
>> "Shelly" <sheldonlg@thevillages.net> wrote in message
>> news:kj1u9e$knh$1@dont-email.me...
>>> On 3/28/2013 11:51 AM, David Makowsky wrote:
>>>> On Saturday, March 23, 2013 3:03:23 PM UTC-5, Fattush wrote:
>>>>> Looks like Bibi blinked first and apologized. I'm disgusted.
>>>>
>>>>> http://www.ynetnews.com/articles/0,7340,L-43601...
>>>>
>>>> The proper response by Netanyahu, and he should have done this right
>>>> after the incident, would have been to publicly announce (and then
>>>> follow
>>>> through if necessary) Israel would provide all necessary aid to Greece
>>>> to
>>>> retake Cyprus.
>>>>
>>>
>>> Yeah right. Another example of "let's you and him fight".
>>>
>>> --
>>> Shelly
>>
>>
>> I like that. My original thought was, "Yes, what we really need is
>> another
>> regional war" Especially if Israel takes on a member of NATO (Turkey)
>> thus
>> (under the NATO treaty) bringing all the other NATO members (and the US
>> happens to be one of them) in to help their ally, Turkey.
>>
>> Jay
>
> Greece is also a member of NATO.
>
> --
> Shelly


GREAT! This way Israel can take on all of NATO at once.

Jay



David Makowsky

3/28/2013 7:38:00 PM

0

On Thursday, March 28, 2013 1:34:23 PM UTC-5, JJ wrote:
> "Shelly" <sheldonlg@thevillages.net> wrote in message
> news:kj1u9e$knh$1@dont-email.me...

> > On 3/28/2013 11:51 AM, David Makowsky wrote:

> >> On Saturday, March 23, 2013 3:03:23 PM UTC-5, Fattush wrote:

> >>> Looks like Bibi blinked first and apologized. I'm disgusted.

> >>> http://www.ynetnews.com/articles/0,7340,L-43601...

> >> The proper response by Netanyahu, and he should have done this right
> >> after the incident, would have been to publicly announce (and then follow
> >> through if necessary) Israel would provide all necessary aid to Greece to
> >> retake Cyprus.

> > Yeah right. Another example of "let's you and him fight".

> I like that. My original thought was, "Yes, what we really need is another
> regional war" Especially if Israel takes on a member of NATO (Turkey) thus
> (under the NATO treaty) bringing all the other NATO members (and the US
> happens to be one of them) in to help their ally, Turkey.

Greece is also in NATO, so your scenario cannot pan out.

Given the economic chaos in both Greece and Cyprus, I don't think a war between Turkey and Greece over Cyprus is so far fetched even without Israel. In fact I would not have even mentioned this if I did not think it was a possibility.

Also relations between Greece and Israel have become much tighter recently while relations between Turkey and Greece have always been awful and a lot of that has to do with Cyprus.

Greece has been VERY helpful in helping Israel develop plans to deal with Iran's nuclear facilities. This includes war games with the Israeli Air Force over Greece. This is very important since Greece has the same Soviet made air defense system that Iran is implementing.

David Makowsky

3/29/2013 5:52:00 AM

0

On Thursday, March 28, 2013 12:25:31 PM UTC-5, shel...@thevillages.net wrote:

> On 3/28/2013 11:51 AM, David Makowsky wrote:

> > On Saturday, March 23, 2013 3:03:23 PM UTC-5, Fattush wrote:

> >> Looks like Bibi blinked first and apologized. I'm disgusted.

> >> http://www.ynetnews.com/articles/0,7340,L-43601...

> > The proper response by Netanyahu, and he should have done this right after the incident, would have been to publicly announce (and then follow through if necessary) Israel would provide all necessary aid to Greece to retake Cyprus.

> Yeah right. Another example of "let's you and him fight".

And a Happy Passover to you to.