factor/basis/tools/time/time-docs.factor

27 lines
908 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: help.markup help.syntax memory system ;
IN: tools.time
ARTICLE: "timing" "Timing code"
"You can time the execution of a quotation in the listener:"
{ $subsection time }
"A lower-level word puts timings on the stack, intead of printing:"
{ $subsection benchmark }
2008-05-07 18:42:41 -04:00
"You can also read the system clock and garbage collection statistics directly:"
{ $subsection micros }
2008-05-07 18:42:41 -04:00
{ $subsection gc-stats }
2007-09-20 18:09:08 -04:00
{ $see-also "profiling" } ;
ABOUT: "timing"
HELP: benchmark
{ $values { "quot" "a quotation" }
{ "runtime" "the runtime in microseconds" } }
2008-05-10 16:23:49 -04:00
{ $description "Runs a quotation, measuring the total wall clock time." }
2007-09-20 18:09:08 -04:00
{ $notes "A nicer word for interactive use is " { $link time } "." } ;
HELP: time
{ $values { "quot" "a quotation" } }
2008-05-07 22:54:41 -04:00
{ $description "Runs a quotation and then prints the total run time and some garbage collection statistics." } ;
2007-09-20 18:09:08 -04:00
{ benchmark micros time } related-words