souffle  2.0.2-371-g6315b36
htmlMain.h
Go to the documentation of this file.
1 #include <string>
2 
3 namespace souffle {
4 namespace profile {
5 namespace html {
6 std::string htmlHeadTop = R"___(
7 <!--
8 * Souffle - A Datalog Compiler
9 * Copyright (c) 2017, The Souffle Developers. All rights reserved
10 * Licensed under the Universal Permissive License v 1.0 as shown at:
11 * - https://opensource.org/licenses/UPL
12 * - <souffle root>/licenses/SOUFFLE-UPL.txt
13 -->
14 <!DOCTYPE html>
15 <html lang="en">
16 <head>
17  <meta charset="UTF-8">
18  <title>Souffle Profiler</title>
19 )___";
20 std::string htmlHeadBottom = R"___(
21 </head>
22 )___";
23 
24 std::string htmlBodyTop = R"___(
25 <body>
26 <div id="wrapper" style="width:100%;height:inherit;">
27  <ul class="tab">
28  <li><a class="tablinks" id="default" onclick="changeTab(event, 'Top');">Top</a></li>
29  <li><a class="tablinks" id="rel_tab" onclick="changeTab(event, 'Relations');came_from = 'rel';">Relations</a></li>
30  <li><a class="tablinks" id="rul_tab" onclick="changeTab(event, 'Rules');came_from = 'rul';">Rules</a></li>
31  <li id="code-tab"><a class="tablinks" id="code_tab" onclick="changeTab(event, 'Code')">Code</a></li>
32  <li><a class="tablinks" onclick="changeTab(event, 'Help')">Help</a></li>
33  <li id="chart-tab" style="display:none;"><a id="chart_tab" onclick="changeTab(event, 'Chart')" class="tablinks">Chart</a></li>
34  </ul>
35  <div id="Help" class="tabcontent" style="max-width:800px;margin-left: auto;margin-right: auto;">
36  <h3>GUI Souffle profiler</h3>
37  <p>Select Relation or Rules from the top bar to see a table of Relations or Rules</p>
38  <p>Tables show:</p>
39  <ul>
40  <li>Name/description</li>
41  <li>ID(generated by profiler)</li>
42  <li>Total time the rule/relation was being processed</li>
43  <li>Non-recursive time</li>
44  <li>Recursive time</li>
45  <li>Copy time</li>
46  <li>number of Tuples of the Rule/relation</li>
47  <li>Percentage of time the rule/relation ran in comparison to the total</li>
48  <li>Percentage of tuples generated by the rule/relation compared to the total</li>
49  <li>The source location of the rule/relation in the datalog file</li>
50  </ul>
51  <p>The tables are sortable by all columns by clicking on the header. Number precision can be toggled by pressing the button at the top of the page to show either shorthand or full precision.</p>
52  <p>In the relation tab, to see the rules of a relation, select a relation from the table, and a table of rules will appear below. Similary, by selecting a Rule in the Rule tab, a list of versions of the rule will show up (for recursive rules).</p>
53  <p>To visualise a graph of a relation, select the relation from the Relations table, then press the graph selected button to show the iterations of the Relation</p>
54  <p>Similarly for a Rule, in the Rules table, select a rule, and select either graph the selected rule's iterations or the versions of the selected rule.</p>
55  </div>
56  <div id="Top" class="tabcontent" style="margin-left: auto;margin-right: auto;">
57  <h3>Top</h3>
58  <div id="top-stats"></div>
59  <h3>Slowest relations to compute</h1>
60  <div class="table_wrapper">
61  <table id='top_rel_table'>
62  <thead>
63  <tr>
64  <th data-sort-method="text">Name</th>
65  <th data-sort-method="text">ID</th>
66  <th data-sort-method="time">Total Time</th>
67  <th data-sort-method="time">Non Rec Time</th>
68  <th data-sort-method="time">Rec Time</th>
69  <th data-sort-method="time">Copy Time</th>
70  <th data-sort-method="number">Tuples</th>
71  <th data-sort-method="number">Reads</th>
72  <th data-sort-method="number">% of Time</th>
73  <th data-sort-method="number">% of Tuples</th>
74  <th data-sort-method="text">Source</th>
75  </tr>
76  </thead>
77  <tbody id="top_rel_table_body">
78  </tbody>
79  </table>
80  </div>
81  <h3>Slowest rules to compute</h1>
82  <div class="table_wrapper">
83  <table id='top_rul_table'>
84  <thead>
85  <tr>
86  <th data-sort-method="text">Name</th>
87  <th data-sort-method="text">ID</th>
88  <th data-sort-method="time">Total Time</th>
89  <th data-sort-method="time">Non Rec Time</th>
90  <th data-sort-method="time">Rec Time</th>
91  <th data-sort-method="number">Tuples</th>
92  <th data-sort-method="number">% of Time</th>
93  <th data-sort-method="number">% of Tuples</th>
94  <th data-sort-method="text">Source</th>
95  </tr>
96  </thead>
97  <tbody id="top_rul_table_body">
98  </tbody>
99  </table>
100  </div>
101  <div id="top-graphs">
102  <h3>CPU time</h1>
103  <div class="ct-chart-cpu"></div>
104  <h3>Maximum Resident Set Size</h1>
105  <div class="ct-chart-rss"></div>
106  </div>
107  <div id="top-config"></div>
108  </div>
109  <div id="Relations" class="tabcontent">
110  <h3>Relations table</h3>
111  <button onclick="toggle_precision();">Toggle number precision</button>
112  <button onclick="graphRel();">Graph iterations of selected</button>
113  <div class="table_wrapper">
114  <table id='Rel_table'>
115  <thead>
116  <tr>
117  <th data-sort-method="text">Name</th>
118  <th data-sort-method="text">ID</th>
119  <th data-sort-method="time">Total Time</th>
120  <th data-sort-method="time">Non Rec Time</th>
121  <th data-sort-method="time">Rec Time</th>
122  <th data-sort-method="time">Copy Time</th>
123  <th data-sort-method="number">Tuples</th>
124  <th data-sort-method="number">Reads</th>
125  <th data-sort-method="number">% of Time</th>
126  <th data-sort-method="number">% of Tuples</th>
127  <th data-sort-method="text">Source</th>
128  </tr>
129  </thead>
130  <tbody id="Rel_table_body">
131  </tbody>
132  </table>
133  </div>
134  <hr/>
135  <div id="rulesofrel" style="display:none;">
136  <h3>Rules of Relation</h3>
137  <div class="table_wrapper">
138  <table id="rulesofrel_table">
139  <thead>
140  <tr>
141  <th data-sort-method="text" style="width:80%;">Name</th>
142  <th data-sort-method="text">ID</th>
143  <th data-sort-method="time">Total Time</th>
144  <th data-sort-method="time">Non Rec Time</th>
145  <th data-sort-method="time">Rec Time</th>
146  <th data-sort-method="number">Tuples</th>
147  <th data-sort-method="number">% of Time</th>
148  <th data-sort-method="number">% of Tuples</th>
149  <th data-sort-method="text" style="width:20%;">Source</th>
150  </tr>
151  </thead>
152  <tbody id="rulesofrel_body">
153 
154  </tbody>
155  </table>
156  </div>
157  </div>
158 </div>
159 <div id="Rules" class="tabcontent">
160  <h3>Rules table</h3>
161  <button onclick="toggle_precision();">Toggle number precision</button>
162  <button onclick="graphIterRul();">Graph iterations of selected</button>
163  <div class="table_wrapper">
164  <table id='Rul_table'>
165  <thead>
166  <tr>
167  <th data-sort-method="text">Name</th>
168  <th data-sort-method="text">ID</th>
169  <th data-sort-method="time">Total Time</th>
170  <th data-sort-method="time">Non Rec Time</th>
171  <th data-sort-method="time">Rec Time</th>
172  <th data-sort-method="number">Tuples</th>
173  <th data-sort-method="number">% of Time</th>
174  <th data-sort-method="number">% of Tuples</th>
175  <th data-sort-method="text">Source</th>
176  </tr>
177  </thead>
178  <tbody id="Rul_table_body">
179  </tbody>
180  </table>
181  </div>
182  <hr/>
183  <div id="rulver" style="display:none;">
184  <h3>Rule Versions Table</h3>
185  <div class="table_wrapper">
186  <table id='rulvertable'>
187  <thead>
188  <tr>
189  <th data-sort-method="text">Name</th>
190  <th data-sort-method="text">ID</th>
191  <th data-sort-method="time">Total Time</th>
192  <th data-sort-method="time">Non Rec Time</th>
193  <th data-sort-method="time">Rec Time</th>
194  <th data-sort-method="number">Tuples</th>
195  <th data-sort-method="number">Ver</th>
196  <th data-sort-method="number">% of Time</th>
197  <th data-sort-method="number">% of Tuples</th>
198  <th data-sort-method="text">Source</th>
199  </tr>
200  </thead>
201  <tbody id="rulver_body">
202  </tbody>
203  </table>
204  </div>
205  </div>
206  <div id="atoms" style="display:none;">
207  <h3>Atom Frequency Table</h3>
208  <div class="table_wrapper">
209  <table id='atomstable'>
210  <thead>
211  <tr>
212  <th data-sort-method="text">Name</th>
213  <th data-sort-method="text">Relation Size</th>
214  <th data-sort-method="text">Frequency</th>
215  </tr>
216  </thead>
217  <tbody id="atoms_body">
218  </tbody>
219  </table>
220  </div>
221  </div>
222 </div>
223 <div id="Chart" class="tabcontent">
224  <button onclick="goBack(event)">Go Back</button>
225  <button onclick="toggle_precision();">Toggle number precision</button>
226  <h1>Total run time</h1>
227  <div class="ct-chart1"></div>
228  <h1>Total number of tuples</h1>
229  <div class="ct-chart2"></div>
230  <!--<h1>Copy time</h1>-->
231  <!--<div class="ct-chart3"></div>-->
232  <!--<button onclick="show_graph_vals=!show_graph_vals;draw_graph();">Toggle values</button>-->
233 </div>
234 <div id="Code" class="tabcontent">
235  <h3>Source Code</h3>
236  <div id="code-view">
237  <ol id="code-list"></ol>
238  </div>
239 </div>
240 </div>
241 )___";
242 std::string htmlBodyBottom = R"___(
243 </body>
244 </html>
245 
246 )___";
247 } // namespace html
248 } // namespace profile
249 } // namespace souffle
souffle::profile::html::htmlHeadBottom
std::string htmlHeadBottom
Definition: htmlMain.h:20
souffle::profile::html::htmlBodyTop
std::string htmlBodyTop
Definition: htmlMain.h:24
souffle::profile::html::htmlHeadTop
std::string htmlHeadTop
Definition: htmlMain.h:6
souffle
Definition: AggregateOp.h:25
souffle::profile::html::htmlBodyBottom
std::string htmlBodyBottom
Definition: htmlMain.h:242