flamegraph #12

Open
artemis wants to merge 2 commits from artemis/breezewiki:flamegraph into main
1 changed files with 8 additions and 8 deletions
Showing only changes of commit 91406af94b - Show all commits

View File

@ -299,8 +299,8 @@
; check that noscript images are removed ; check that noscript images are removed
(check-equal? ((query-selector (λ (t a c) (eq? t 'noscript)) transformed)) #f) (check-equal? ((query-selector (λ (t a c) (eq? t 'noscript)) transformed)) #f)
; benchmark ; benchmark
(when (file-exists? "../storage/Frog.html") (when (file-exists? "../storage/Block.html")
(with-input-from-file "../storage/Frog.html" (with-input-from-file "../storage/Block.html"
(λ () (λ ()
(define tree (html->xexp (current-input-port))) (define tree (html->xexp (current-input-port)))
(time (length (update-tree-wiki tree "minecraft")))))) (time (length (update-tree-wiki tree "minecraft"))))))
@ -309,23 +309,23 @@
; these two flamegraphs need to be separated i think so that they resolve ; these two flamegraphs need to be separated i think so that they resolve
; different thunks. probably only need to be in two different with-input-file ; different thunks. probably only need to be in two different with-input-file
; blocks. ; blocks.
(when (file-exists? "../storage/Frog.html") (when (file-exists? "../storage/Block.html")
(with-input-from-file "../storage/Frog.html" (with-input-from-file "../storage/Block.html"
(λ () (λ ()
(define tree (html->xexp (current-input-port))) (define tree (html->xexp (current-input-port)))
(profile (profile
(length (update-tree-wiki tree "minecraft")) (length (update-tree-wiki tree "minecraft"))
#:svg-path "../storage/Frog-profile-errortrace.svg" #:svg-path "../storage/Block-profile-errortrace.svg"
#:repeat 100 #:repeat 100
#:use-errortrace? #t) #:use-errortrace? #t)
))) )))
(when (file-exists? "../storage/Frog.html") (when (file-exists? "../storage/Block.html")
(with-input-from-file "../storage/Frog.html" (with-input-from-file "../storage/Block.html"
(λ () (λ ()
(define tree (html->xexp (current-input-port))) (define tree (html->xexp (current-input-port)))
(profile (profile
(length (update-tree-wiki tree "minecraft")) (length (update-tree-wiki tree "minecraft"))
#:svg-path "../storage/Frog-profile.svg" #:svg-path "../storage/Block-profile.svg"
#:repeat 100 #:repeat 100
#:use-errortrace? #f) #:use-errortrace? #f)
))) )))