/usr/share/doc/racket/future-visualizer/index.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Futures Visualizer</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Futures Visualizer</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="future-visualizer-timeline.html" class="tocviewlink" data-pltdoc="x">Execution Timeline</a></td></tr><tr><td align="right">2 </td><td><a href="future-visualizer-tree.html" class="tocviewlink" data-pltdoc="x">Future Creation Tree</a></td></tr><tr><td align="right">3 </td><td><a href="futures-trace.html" class="tocviewlink" data-pltdoc="x">Futures Tracing</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">Futures Visualizer</a></td></tr><tr><td><a href="#%28form._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">visualize-<wbr></wbr>futures</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures-thunk%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">visualize-<wbr></wbr>futures-<wbr></wbr>thunk</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._show-visualizer%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">show-<wbr></wbr>visualizer</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.1</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">up</a> <a href="future-visualizer-timeline.html" title="forward to "1 Execution Timeline"" data-pltdoc="x">next →</a></span> </div><h2 x-source-module="(lib "future-visualizer/scribblings/future-visualizer.scrbl")" x-part-tag=""top""><a name="(part._top)"></a><a name="(part._futures-visualizer)"></a><a name="(mod-path._future-visualizer)"></a>Futures Visualizer</h2><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=parallelism.html%23%2528part._effective-futures%2529&version=6.1" class="Sq" data-pltdoc="x">Parallelism with Futures</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=index.html&version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces </p></blockquote></blockquote></blockquote><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">future-visualizer</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">future-visualizer</span></span></td></tr></table></p><p>The <a name="(tech._futures._visualizer)"></a><span style="font-style: italic">futures visualizer</span> is a graphical profiling tool
for parallel programs written using <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=futures.html%23%2528def._%2528%2528lib._racket%252Ffuture..rkt%2529._future%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">future</a></span>. The tool
shows a timeline of a program’s execution including all future-related
events, as well as the overall amount of processor utilization
at any point during the program’s lifetime.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._future-visualizer/main..rkt)._visualize-futures))"></a><span title="Provided from: future-visualizer | Package: future-visualizer"><span class="RktSym"><a href="#%28form._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">visualize-futures</a></span></span><span class="hspace"> </span><span class="RktVar">e</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._future-visualizer/main..rkt)._visualize-futures-thunk))"></a><span title="Provided from: future-visualizer | Package: future-visualizer"><span class="RktSym"><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures-thunk%29%29" class="RktValDef RktValLink" data-pltdoc="x">visualize-futures-thunk</a></span></span><span class="hspace"> </span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">any</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">thunk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><span class="nobreak">-></span></span><span class="hspace"> </span><span class="RktSym">any</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures%29%29" class="RktStxLink" data-pltdoc="x">visualize-futures</a></span> macro enables the collection
of data required by the visualizer and displays a profiler
window showing the corresponding trace. The <span class="RktSym"><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures-thunk%29%29" class="RktValLink" data-pltdoc="x">visualize-futures-thunk</a></span>
provides similar functionality where program code is contained
within <span class="RktVar">thunk</span>.</div></p><p>A typical program using profiling might look like the following:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">racket/future</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">future-visualizer</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures%29%29" class="RktStxLink" data-pltdoc="x">visualize-futures</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">f</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=futures.html%23%2528def._%2528%2528lib._racket%252Ffuture..rkt%2529._future%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">future</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=futures.html%23%2528def._%2528%2528lib._racket%252Ffuture..rkt%2529._touch%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">touch</a></span><span class="hspace"> </span><span class="RktSym">f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The preceding program is equivalent to:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">racket/future</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">future-visualizer/trace</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">future-visualizer</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._start-future-tracing%21%29%29" class="RktValLink" data-pltdoc="x">start-future-tracing!</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">f</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=futures.html%23%2528def._%2528%2528lib._racket%252Ffuture..rkt%2529._future%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">future</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=futures.html%23%2528def._%2528%2528lib._racket%252Ffuture..rkt%2529._touch%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">touch</a></span><span class="hspace"> </span><span class="RktSym">f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._stop-future-tracing%21%29%29" class="RktValLink" data-pltdoc="x">stop-future-tracing!</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._show-visualizer%29%29" class="RktValLink" data-pltdoc="x">show-visualizer</a></span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._future-visualizer/main..rkt)._show-visualizer))"></a><span title="Provided from: future-visualizer | Package: future-visualizer"><span class="RktSym"><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._show-visualizer%29%29" class="RktValDef RktValLink" data-pltdoc="x">show-visualizer</a></span></span><span class="hspace"> </span><span class="RktPn">#:timeline</span><span class="hspace"> </span><span class="RktVar">timeline</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">timeline</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">listof</span><span class="hspace"> </span><span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._indexed-future-event~3f%29%29" class="RktValLink" data-pltdoc="x">indexed-future-event?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Displays the visualizer window. If the function is called with no arguments,
it must be preceded by the following sequence: a call to <span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._start-future-tracing%21%29%29" class="RktValLink" data-pltdoc="x">start-future-tracing!</a></span>,
program code that is being traced, and a call to <span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._stop-future-tracing%21%29%29" class="RktValLink" data-pltdoc="x">stop-future-tracing!</a></span> – in which case
the visualizer will show data for all events logged in between those calls (via <span class="RktSym"><a href="futures-trace.html#%28def._%28%28lib._future-visualizer%2Ftrace..rkt%29._timeline-events%29%29" class="RktValLink" data-pltdoc="x">timeline-events</a></span>).
Note that <span class="RktSym"><a href="#%28form._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures%29%29" class="RktStxLink" data-pltdoc="x">visualize-futures</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._future-visualizer%2Fmain..rkt%29._visualize-futures-thunk%29%29" class="RktValLink" data-pltdoc="x">visualize-futures-thunk</a></span> are simpler alternatives to using these
primitives directly.
The <span class="RktVar">timeline</span> argument can be used to show the visualizer for a previously-generated
trace.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">up</a> <a href="future-visualizer-timeline.html" title="forward to "1 Execution Timeline"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|