2 texidoc = "This file profiles property accesses; the log file shows the top properties examined."
6 #(ly:set-option 'profile-property-accesses #t)
10 \include "../../input/typography-demo.ly"
11 %\book { \score { {c4 } } }
13 #(define (prop-stats>? x y) (> (cdr x) (cdr y)))
15 #(define (display-stats what hash)
19 (ly:progress "\n~A properties, top ~a rounded to ~a\n~a"
22 (map (lambda (x) (format "~30a: ~6@a" (car x) (* rnd (inexact->exact (round (/ (cdr x) rnd))))))
24 (sort (hash-table->alist hash) prop-stats>?) count))
29 #(display-stats "Context" (ly:context-property-lookup-stats))
31 #(display-stats "Grob" (ly:grob-property-lookup-stats))