Contract profiler: support incomplete blame objects.
This commit is contained in:
parent
cc0e67638c
commit
7495243d34
|
@ -191,7 +191,7 @@
|
|||
(printf "~a[label=\"~a\"][color=\"~a\"]\n"
|
||||
(hash-ref nodes->names n)
|
||||
n
|
||||
(if (hash-ref nodes->typed? n) "green" "red")))
|
||||
(if (hash-ref nodes->typed? n #f) "green" "red")))
|
||||
(for ([(k v) (in-hash edge-samples)])
|
||||
(match-define (cons pos neg) k)
|
||||
(printf "~a -> ~a[label=\"~ams\"]\n"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/port)
|
||||
(require racket/port racket/contract)
|
||||
|
||||
(provide (all-defined-out))
|
||||
|
||||
|
@ -33,3 +33,13 @@
|
|||
(with-output-to-file file
|
||||
#:exists 'replace
|
||||
(lambda () body ...))))
|
||||
|
||||
;; for debugging
|
||||
(define (print-blame b)
|
||||
(printf (string-append "#<blame positive=~a\n"
|
||||
" negative=~a\n"
|
||||
" contract=~a\n"
|
||||
" value=~a\n"
|
||||
" source=~a>\n")
|
||||
(blame-positive b) (blame-negative b)
|
||||
(blame-contract b) (blame-value b) (blame-source b)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user