forked from cadence/breezewiki
		
	benchmark flamegraph w/profile-flame-graph & flamegraph.pl
This commit is contained in:
		
							parent
							
								
									d1c348a853
								
							
						
					
					
						commit
						abb898b73a
					
				
					 1 changed files with 28 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
         racket/function
 | 
			
		||||
         racket/match
 | 
			
		||||
         racket/string
 | 
			
		||||
         profile-flame-graph
 | 
			
		||||
         "pure-utils.rkt"
 | 
			
		||||
         "url-utils.rkt"
 | 
			
		||||
         "xexpr-utils.rkt")
 | 
			
		||||
| 
						 | 
				
			
			@ -302,4 +303,30 @@
 | 
			
		|||
    (with-input-from-file "../storage/Frog.html"
 | 
			
		||||
      (λ ()
 | 
			
		||||
        (define tree (html->xexp (current-input-port)))
 | 
			
		||||
        (time (length (update-tree-wiki tree "minecraft")))))))
 | 
			
		||||
        (time (length (update-tree-wiki tree "minecraft"))))))
 | 
			
		||||
 | 
			
		||||
  ; benchmark with flamegraph
 | 
			
		||||
  ; 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
 | 
			
		||||
  ; blocks.
 | 
			
		||||
  (when (file-exists? "../storage/Frog.html")
 | 
			
		||||
    (with-input-from-file "../storage/Frog.html"
 | 
			
		||||
      (λ ()
 | 
			
		||||
        (define tree (html->xexp (current-input-port)))
 | 
			
		||||
        (profile
 | 
			
		||||
          (length (update-tree-wiki tree "minecraft"))
 | 
			
		||||
          #:svg-path "../storage/Frog-profile-errortrace.svg"
 | 
			
		||||
          #:repeat 100
 | 
			
		||||
          #:use-errortrace? #t)
 | 
			
		||||
        )))
 | 
			
		||||
  (when (file-exists? "../storage/Frog.html")
 | 
			
		||||
    (with-input-from-file "../storage/Frog.html"
 | 
			
		||||
      (λ ()
 | 
			
		||||
        (define tree (html->xexp (current-input-port)))
 | 
			
		||||
        (profile
 | 
			
		||||
          (length (update-tree-wiki tree "minecraft"))
 | 
			
		||||
          #:svg-path "../storage/Frog-profile.svg"
 | 
			
		||||
          #:repeat 100
 | 
			
		||||
          #:use-errortrace? #f)
 | 
			
		||||
        )))
 | 
			
		||||
  )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue