{"size": 1356, "ext": "scrbl", "max_stars_repo_path": "profile-doc/profile/scribblings/profile.scrbl", "max_stars_repo_name": "pavpanchekha/profile", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "profile-doc/profile/scribblings/profile.scrbl", "max_issues_repo_name": "pavpanchekha/profile", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "profile-doc/profile/scribblings/profile.scrbl", "max_forks_repo_name": "pavpanchekha/profile", "max_forks_repo_forks_event_min_datetime": "2016-01-09T16:19:27.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-23T17:17:35.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 6, "avg_line_length": 42.375, "max_line_length": 79, "alphanum_fraction": 0.7898230088}
#lang scribble/doc

@(require scribble/manual
          (for-label racket/base))

@title{Profile: Statistical Profiler}

The @racketmodname[profile] collection implements a statistical profiler.  The
profiling is done by running a background thread that collects stack snapshots
either via @racket[continuation-mark-set->context] or via @seclink["top" #:doc
'(lib "errortrace/scribblings/errortrace.scrbl")]{Errortrace}, meaning that the
result is an estimate of the execution costs.

When using @racket[continuation-mark-set->context], it is limited to the kind
of information that @racket[continuation-mark-set->context] produces (most
notably being limited to functions calls, and subject to compiler
optimizations); but the result is often useful. In practice, since this method
does not require recompilation of your source and has very little runtime
overhead, it can be used for longer runs which compensates for these limits.

When using @seclink["top" #:doc '(lib
"errortrace/scribblings/errortrace.scrbl")]{Errortrace}, profiles are more
precise and more fine-grained (expression-level instead of function-level) but
profiling has higher overhead and recompilation may be necessary.

@table-of-contents[]

@include-section["toplevel.scrbl"]
@include-section["sampler.scrbl"]
@include-section["analyzer.scrbl"]
@include-section["renderers.scrbl"]
