Print cost breakdown to a file.

This commit is contained in:
Vincent St-Amour 2013-06-04 17:34:23 -04:00
parent 3ce40fbcb5
commit a22e1ff218

View File

@ -35,7 +35,9 @@
(define (analyze-contract-samples contract-samples samples*)
(define correlated (correlate-contract-samples contract-samples samples*))
(print-breakdown correlated)
(with-output-to-file cost-breakdown-file
#:exists 'replace
(lambda () (print-breakdown correlated)))
(module-graph-view correlated)
(boundary-view correlated))
@ -44,6 +46,9 @@
;; Break down contract checking time by contract, then by callee and by chain
;; of callers.
(define cost-breakdown-file
(string-append output-file-prefix "cost-breakdown.txt"))
(define (print-breakdown correlated)
(match-define (contract-profile
total-time n-samples n-contract-samples