This file is indexed.

/usr/share/shake/html/profile.html is in libghc-shake-data 0.15.11+dfsg-1.

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
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8" />
<title>Shake report</title>

<!-- Profiling output -->
<script src="profile-data.js"></script>
<script src="version.js"></script>
<!-- Libraries -->
<script src="lib/jquery.js"></script>
<script src="lib/jquery.flot.js"></script>
<script src="lib/jquery.flot.stack.js"></script>
<script src="viz.js"></script>
<!-- Functions for creating info from Shake builds -->
<script src="shake.js"></script>
<script language="javascript">
function name(a, b) { return named(a, b); }
initProfile();
</script>

<style type="text/css">
body {font-family: sans-serif; font-size: 10pt;}
.data {font-size: 9pt; border-spacing: 0px; border-collapse: collapse;}
.data td {padding-left: 7px; padding-right: 7px;}
.header {font-weight: bold; background-color: #eee !important;}
.header td:hover {background-color: #ccc !important;}
.header td {border: 1px solid #ccc; cursor: pointer;}
.data tr:hover {background-color: #ddd !important; color: black !important;}
input, select {border: 1px solid #ccc;}
* {box-sizing: border-box;}
html, body {height: 100%; width:100%;}
#run {font-weight: bold;}
.sort {color: #aaa;}
#link:visited {color: rgb(0,0,238);}
ul.space > li {padding-top: 8px; padding-bottom: 8px;}
ul.space {padding-left: 20px;}
.version {color: gray; font-style: italic;}
.shake {
    text-decoration: none;
    font-family: monospace;
    color: black;
}
</style>

</head>
<body style="margin:0px;padding:0px;">

<table style="width:100%;height:100%;padding:8px;">
    <tr><td>
        <table width="100%"><tr>
            <td>
                <button id="run">Run</button>
            </td>
            <td>
                <select id="mode">
                    <option value="summary">Summary</option>
                    <option value="help">Help</option>
                    <option value="cmd-plot">Command plot</option>
                    <option value="cmd-table">Command table</option>
                    <option value="rule-table">Rule table</option>
                    <option value="rule-graph">Rule graph</option>
                </select>
            </td>
            <td width="100%">
                <input id="query" style="width:100%;" />
            </td>
            <td style="padding-left:10px;">
                <a title="A link to the currently typed query" id="link" target="_blank" href="">Link</a>
            </td>
        </tr></table>
    </td></tr>
    <tr><td>
        <hr style="border-top:1px solid #ccc;" />
    </td></tr>
    <tr style="height:100%;width:100%;"><td>
        <div style="height:100%;width:100%;min-width:150px;min-height:150px;overflow:auto;" id="output">Loading...</div>
    </td></tr>
</table>

<div id="welcome" style="display:none;">
    <p>
        <b>New to Shake reports?</b> Select 'Help' from the drop-down box (currently displaying 'Summary') then press 'Run'.
    </p>
</div>

<div id="error" style="display:none;">
    <h3 style="color:#d00;">Query <span class="name">parse</span> error</h3>
    <table>
        <tr><td><ul style="margin:0px;"><li>Error message:</li></ul></td><td><code><span class="message">message</span></code></td></tr>
        <tr><td><ul style="margin:0px;"><li>User query:</li></ul></td><td><code><span class="query">the query</span></code></td></tr>
    </table>
    <p>
        For information about the query language, see <a class="example" data-mode="help" data-query="">Help</a>.
    </p>
</div>

<div id="help" style="display:none;">
    <p>
        Shake reports provide a way of filtering, grouping and viewing the result of running a Shake build system. A query is entered at the top using the text box, run using the 'Run' button, and produces a report whose type is selected from the drop-down box. The 'Link' hyperlink provides a link to the currently entered query, which is useful for copying/sharing.
    </p>
    <h3>Report types</h3>
    <p>
        The drop-down box, currently displaying 'Help', let's you pick the type of report. The best way to learn about the report types is to try them out (all work with the empty query). The types are:
    </p>
    <ul class="space">
        <li><b>Summary:</b> Display summary statistics about the Shake database. The term 'rule' refers to any Shake rule, and there will be one rule for everything that gets built or tracked, including source files. The term 'traced command' refers to any call to <a class="shake">traced</a>, which is automatically inserted by the <a class="shake">command</a> function. The reported parallelism refers to the average number of traced commands executing during the last build - for example, a parallelism of 4.0 when using <a class="shake">shakeThreads</a>=4 would be a perfect speedup. The time spent not executing traced commands includes time when Shake was checking dependencies and any Haskell operations performed by the rules.</li>
        <li><b>Help:</b> This help document.</li>
        <li><b>Command plot:</b> This plot shows which traced commands were executing at any time. The Y axis is the number of simultaneous traced commands and the X axis is the progress through the last run of the build system that executed any rules. Some useful queries are:
            <ul>
                <li><a class="example" data-mode="cmd-plot" data-query="">by default</a> - display when each traced command was executing.</li>
                <li><a class="example" data-mode="cmd-plot">group("commands")</a> - display a the total parallelism, not grouped by command.</li>
                <li><a class="example" data-mode="cmd-plot">name(/(\.[a-zA-Z0-9_]+)$/, "???")</a> - display parallelism grouped by result extension.</li>
            </ul>
        </li>
        <li><b>Command table:</b> This table shows all traced commands. 'name' is the group name, by default the string passed to <a class="shake">trace</a>. 'count' is the number of commands that were grouped together. 'time' is the amount of time spent executing the commands, both in absolute terms and as a percentage of the time required to build everything (including rules which are not traced). Some useful queries are:
            <ul>
                <li><a class="example" data-mode="cmd-table" data-query="">by default</a> - display all traced commands.</li>
                <li><a class="example" data-mode="cmd-table">name(/(\.[a-zA-Z0-9_]+)$/, "???")</a> - display parallelism grouped by result extension.</li>
                <li><a class="example" data-mode="cmd-table">group(command() + " - " + name())</a> - the complete list of all commands by rule.</li>
                <li><a class="example" data-mode="cmd-table">name(/^(.*)\/[^\/]*/,"root") &amp;&amp; group(command())</a> - commands grouped per directory.</li>
                <li><a class="example" data-mode="cmd-table">name(slowestRule())</a> - what commands did the slowest rule run.</li>
            </ul>
        </li>
        <li><b>Rule table:</b> This table shows all rules. 'name', 'count' and 'time' are the same as for the command table, with the default name being the rule result. 'cost' is the time to rebuild if all the files changed, where a higher cost is worse. 'leaf' is true if the rule has no dependencies, typically source files. 'runs' is the number of executions since the file was built, where 0 means it was built in the last run. 'unchanged' is true if the last time the rule built it did not change value, and thus rules depending on it did not rebuild. Some useful queries are:
            <ul>
                <li><a class="example" data-mode="rule-table" data-query="">by default</a> - display all rules.</li>
                <li><a class="example" data-mode="rule-table">name(/(\.[a-zA-Z0-9_]+)$/, "???")</a> - display rules grouped by result extension.</li>
                <li><a class="example" data-mode="rule-table">ancestorOf(slowestRule()) && leaf() && run() == 0</a> - while leaf nodes changed in the last run to cause a rebuild of a particular rule (replace <code>slowestRule()</code> with <code>"rule name"</code> to use a different rule.</li>
                <li><a class="example" data-mode="rule-table">parentOf(slowestRule()) && !unchanged()</a> - what immediate dependency caused a particular rule to rebuild most recently (sort by 'run' to see the answer first).</li>
                <li><a class="example" data-mode="rule-table">!name(/\.[a-zA-Z0-9_]+$/)</a> - which rules have no extension.</li>
            </ul>
        </li>
        <li><b>Rule graph:</b> This table shows the rules and their dependencies. An arrow from a child node to a parent node indicates that the child depends on the parent. A solid line is a direct dependency, a dashed line is an indirect dependency, through some hidden intermediate node. Some useful queries are:
            <ul>
                <li><a class="example" data-mode="rule-graph">name(/(\.[a-zA-Z0-9_]+)$/, "???")</a> - display rules grouped by result extension.</li>
            </ul>
        </li>
    </ul>
    <h3>Query language</h3>
    <p>
        The query language is a Javascript expression which produces <code>true</code> to include the row, and may call <code>group</code> to indicate grouping. You can use the standard Javascript operators (e.g. <code>==</code> and <code>&amp;&amp;</code>). Anything which takes a <code>RegExp</code> can also accept a <code>string</code>, which is then treated as a literal unanchored regular expression. The following functions are available:
    </p>
    <ul class="space">
        <li><code>group(x : string) : true</code> - assign this item the given group. Multiple calls to <code>group</code> result in a space-separated name. The group name can also be set using <code>name</code> or <code>command</code> with captured regular expressions.</li>
        <li><code>leaf() : bool</code> - is the rule a leaf, with no dependencies.</li>
        <li><code>run() : int</code> - when was the rule last run, with 0 for run in the last tracked build, and higher numbers for run longer ago.</li>
        <li><code>run(x : int) : bool</code> - equality against a run number, <code>run(0)</code> is equivalent to <code>run() == 0</code>.</li>
        <li><code>unchanged() : bool</code> - last time the rule was built, did the value not change.</li>
        <li><code>slowestRule() : string</code> - the name of the rule which took longest to build.</li>
        <li><code>name() : string</code> - the name of the current rule.</li>
        <li><code>name(x : RegExp) : bool</code> - a regular expression to match against the name of the current rule. If the regular expression contains captured patterns, these will be used as the <code>group</code></li>
        <li><code>name(x : RegExp, def : string) : true</code> - a regular expression to match against the name of the current rule, including captured patterns for the <code>group</code>. If the regular expression does not match, the function will still return true but <code>def</code> will be used as the group.</li>
        <li><code>rename(from : string, to : string) : true</code> - change <code>name</code> so any string <code>from</code> is replaced with <code>to</code>, useful for replacing an object directory (which is uninteresting) with something like $OBJ.</li>
        <li><code>rename(from : string) : true</code> - rename using <code>""</code> as the replacement string.</li>
        <li><code>command() : string</code> - when matching rules this is the name of the first command the rule executed, or <code>""</code> if the rule ran no commands. When matching commands this is the name of each command in turn.</li>
        <li><code>command(x : RegExp) : bool</code> - a regular expression to match against any of the commands, including grouping as per <code>name</code>.</li>
        <li><code>command(x : RegExp, def : string) : true</code> - works the same as the <code>name</code> function which takes two arguments.</li>
        <li><code>childOf(x : RegExp) : bool</code> - is this rule a direct child of <code>x</code>, the rule for this item calls <a class="shake">need</a>/<a class="shake">apply</a> on <code>x</code>.</li>
        <li><code>descendantOf(x : RegExp) : bool</code> - is this rule a descendant of <code>x</code>, a change in <code>x</code> will cause this rule to rebuild (ignoring unchanging rules).</li>
        <li><code>parentOf(x : RegExp) : bool</code> - is this rule a direct parent of <code>x</code>, the rule for <code>x</code> calls <a class="shake">need</a>/<a class="shake">apply</a> on this item.</li>
        <li><code>ancestorOf(x : RegExp) : bool</code> - is this rule an ancestor of <code>x</code>, a change in this rule will cause <code>x</code> to rebuild (ignoring unchanging rules).</li>
        <li><code>textColor(c : color) : true</code> - set the color of this group to the given color, represented as a string - either the name of a color (<code>"red"</code>) or a hex value (<code>"#ff0000</code>). If multiple <code>textColor</code> calls are given in one query, the last one will be used. If multiple different <code>textColor</code> values are given to one group, the group will not be colored.</li>
        <li><code>textColor(c : color, b : bool) : true</code> - set the <code>textColor</code> of this group if the second argument is <code>true</code>.</li>
        <li><code>backColor(c : color) : true</code> - like <code>textColor</code> but to set the background color.</li>
        <li><code>backColor(c : color, b : bool) : true</code> -  like <code>textColor</code> but to set the background color.</li>
    </ul>
</div>

</body>
</html>