From a22e1ff2189a7a3e5912e05bab7596a2b36b6b70 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 4 Jun 2013 17:34:23 -0400 Subject: [PATCH] Print cost breakdown to a file. --- collects/profile/contract-profile.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/profile/contract-profile.rkt b/collects/profile/contract-profile.rkt index ce7b9658da..92cf724b2e 100644 --- a/collects/profile/contract-profile.rkt +++ b/collects/profile/contract-profile.rkt @@ -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