Reprovide the structs from "analyzer.rkt".
(Also switch to `struct'.) original commit: eec994a899c5c2ba50f81812836a47f0e28607b4
This commit is contained in:
parent
2bfd246647
commit
c211c38729
|
@ -2,10 +2,10 @@
|
|||
|
||||
;; Analyzer for the sampler results
|
||||
|
||||
(provide analyze-samples)
|
||||
|
||||
(require "structs.rkt" "utils.rkt" racket/list)
|
||||
|
||||
(provide analyze-samples (all-from-out "structs.rkt"))
|
||||
|
||||
(define-syntax-rule (with-hash <hash> <key> <expr>)
|
||||
(hash-ref! <hash> <key> (lambda () <expr>)))
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(provide profile-thunk profile)
|
||||
|
||||
(require "sampler.rkt" "analyzer.rkt"
|
||||
(require "sampler.rkt" (except-in "analyzer.rkt" profile)
|
||||
(prefix-in text: "render-text.rkt")
|
||||
(for-syntax racket/base))
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(provide render)
|
||||
|
||||
(require "structs.rkt" "analyzer.rkt" "utils.rkt")
|
||||
(require "analyzer.rkt" "utils.rkt")
|
||||
|
||||
(define (render profile
|
||||
#:hide-self [hide-self% 1/100]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(provide render)
|
||||
|
||||
(require "structs.rkt" "analyzer.rkt" "utils.rkt" racket/list)
|
||||
(require "analyzer.rkt" "utils.rkt" racket/list)
|
||||
|
||||
(define (f:msec msec)
|
||||
(number->string (round (inexact->exact msec))))
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
;; identifiable by having both id and src fields being #f. Can be used to
|
||||
;; start a graph traversal from the top or the bottom.
|
||||
(provide (struct-out profile))
|
||||
(define-struct profile
|
||||
(total-time cpu-time sample-number thread-times nodes *-node))
|
||||
(struct profile
|
||||
(total-time cpu-time sample-number thread-times nodes *-node)
|
||||
#:constructor-name make-profile)
|
||||
|
||||
;; An entry for a single profiled function:
|
||||
;; - id, src: the corresponding values from `continuation-mark-set->context'.
|
||||
|
@ -36,7 +37,8 @@
|
|||
#:property prop:custom-write
|
||||
(lambda (node o w?)
|
||||
(fprintf o "#<node:~s>"
|
||||
(or (node-id node) (if (node-src node) '??? 'ROOT)))))
|
||||
(or (node-id node) (if (node-src node) '??? 'ROOT))))
|
||||
#:constructor-name make-node)
|
||||
|
||||
;; An edge representing function calls between two nodes:
|
||||
;; - total: the total time spent while the call was anywhere on the stack.
|
||||
|
@ -52,4 +54,5 @@
|
|||
(lambda (edge o w?)
|
||||
(fprintf o "#<edge:~s-~s>"
|
||||
(or (node-id (edge-caller edge)) '???)
|
||||
(or (node-id (edge-callee edge)) '???))))
|
||||
(or (node-id (edge-callee edge)) '???)))
|
||||
#:constructor-name make-edge)
|
||||
|
|
Loading…
Reference in New Issue
Block a user