[racket] profiling

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Nov 10 10:32:30 EST 2011

Sorry, just 'profile'.

Robby

On Thu, Nov 10, 2011 at 9:32 AM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> There's also the (probably more useful) racket/profile library that
> uses sampling.
>
> Robby
>
> On Thu, Nov 10, 2011 at 9:28 AM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> Here's a program:
>>
>> #lang racket
>>
>> (define (even? n)
>>  (if (zero? n) true (odd? (sub1 n))))
>>
>> (define (odd? n)
>>  (if (zero? n) false (even? (sub1 n))))
>>
>> Go to Language | Choose Language, click on Show Details, and at the
>> top-right, select "Debugging and profiling".
>>
>> Now run the program and in the interactions window, run
>>
>>> (even? 25)
>>
>> Go to View | Show Profile.  At the bottom of your screen will be the
>> profiling information, showing 13 calls each to even? and odd?.
>>
>> If you run
>>
>>> (even? 25)
>>
>> again in the interactions window, the profile doesn't appear to
>> change.  But click on Update Profile (bottom-left) and it'll now show
>> 26 calls each.
>>
>> From there, mess around!
>>
>> Shriram
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>>
>



Posted on the users mailing list.