]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/time/time-docs.factor
fe3d709f78f9943163a63751b1afe33530ccebc7
[factor.git] / basis / tools / time / time-docs.factor
1 USING: help.markup help.syntax memory system ;
2 IN: tools.time
3
4 ARTICLE: "timing" "Timing code"
5 "You can time the execution of a quotation in the listener:"
6 { $subsection time }
7 "A lower-level word puts timings on the stack, intead of printing:"
8 { $subsection benchmark }
9 "You can also read the system clock and garbage collection statistics directly:"
10 { $subsection millis } 
11 { $subsection gc-stats }
12 { $see-also "profiling" } ;
13
14 ABOUT: "timing"
15
16 HELP: benchmark
17 { $values { "quot" "a quotation" }
18           { "runtime" "an integer denoting milliseconds" } }
19       { $description "Runs a quotation, measuring the total wall clock time." }
20 { $notes "A nicer word for interactive use is " { $link time } "." } ;
21
22 HELP: time
23 { $values { "quot" "a quotation" } }
24 { $description "Runs a quotation and then prints the total run time and some garbage collection statistics." } ;
25
26 { benchmark millis time } related-words