[racket] Profiling mostly macro-generated definitions?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Aug 28 14:17:05 EDT 2012

Well, here's an example of it working. I don't know what to suggest
but to ask if you could make a small program that illustrates it not
working and maybe we can go from there to understand why you're seeing
what you're seeing.

#lang racket
(require profile)

(define h (make-hash))
(profile
 (let loop ([n 1000000])
   (unless (zero? n)
     (hash-set! h n #t)
     (hash-ref h n)
     (loop (- n 1)))))



Profiling results
-----------------
  Total cpu time observed: 823ms (out of 890ms)
  Number of samples taken: 10 (once every 82ms)

=======================================================
                              Caller
Idx  Total       Self       Name+src             Local%
     ms(pct)     ms(pct)      Callee
=======================================================
[1] 823(100.0%)   0(0.0%)   [running body] /Users/robby/tmp.rkt:##f
                              profile-thunk12 [2]100.0%
-------------------------------------------------------
                              [running body] [1] 100.0%
[2] 823(100.0%)   0(0.0%)   profile-thunk12 ...t/collects/profile/main.rkt:9:0
                              run [3]            100.0%
-------------------------------------------------------
                              profile-thunk12 [2]100.0%
[3] 823(100.0%) 823(100.0%) run .../git/exp/plt/collects/profile/main.rkt:29:2
-------------------------------------------------------


On Tue, Aug 28, 2012 at 1:09 PM, J. Ian Johnson <ianj at ccs.neu.edu> wrote:
> Not unless that's default behavior.
> -Ian

Posted on the users mailing list.