2 API
(require pgmp) | package: rackpgmp |
(require pgmp/api/exact) |
This section describes the API provided by pgmp for meta-programmers to write their own profile-guided meta-programs.
procedure
(make-profile-point-factory prefix)
→ (-> source-location? profile-point?) prefix : string?
procedure
(profile-point? expr) → boolean?
expr : any/c
syntax
(annotate-syn profile-point template)
profile-point : profile-point?
procedure
(profile-file file-source) → path?
file-source : (or/c source-location? path? path-string?)
procedure
(save-profile file-source) → void?
file-source : (or/c source-location? path? path-string?)
procedure
(run-with-profiling module) → void?
module : module-path?
procedure
(load-profile file-source)
→
(-> (or/c syntax? profile-point?) (or/c natural-number/c #f)) (-> (or/c profile-point?) (or/c (real-in 0 1) #f)) file-source : (or/c source-location? path? path-string?)
The first function returns the exact execution count associated with a profile point, or #f if no profile information exists for that profile point.
The second function returns the profile weight associated with that profile point, or #f is no profile information exists for that profile point. A profile weight is the ratio of the exact execution count to the maximum execution count of any other profile point.
procedure
(load-profile-look-up file-source)
→ (-> (or/c syntax? profile-point?) (or/c natural-number/c #f)) file-source : (or/c source-location? path? path-string?)
procedure
(load-profile-query-weight file-source)
→ (-> (or/c syntax? profile-point?) (or/c natural-number/c #f)) file-source : (or/c source-location? path? path-string?)