-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp.html
More file actions
158 lines (136 loc) · 7.26 KB
/
app.html
File metadata and controls
158 lines (136 loc) · 7.26 KB
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
<!DOCTYPE html>
<html lang="en">
<!--
MySQL Slow Query Log Visualizer
By Frédéric Camblor (http://www.4sh.fr) and Geoff Gaudreault (http://www.neurofuzzy.net)
Many thanks to:
List.js author Jonny Strömberg (www.jonnystromberg.se, www.listjs.com)
https://github.com/javve/list
Initial MySQL Slow Query Log Visualizer Geoff Gaudreault http://www.neurofuzzy.net
https://code.google.com/p/mysql-slow-query-log-visualizer/
License (MIT)
Copyright (c) 2015 Frédéric Camblor http://www.4sh.fr
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-->
<head>
<meta charset="utf-8">
<title>MySQL Slow Query Log Visualizer</title>
<!-- base -->
<link rel="stylesheet" href="css/style.css">
<script src="js/script.js"></script>
<!-- visualizer -->
<script type="text/javascript" src="js/enhance.js"></script>
<script type="text/javascript">
// Run capabilities test
enhance({
loadScripts: [
{src: 'js/excanvas.js', iecondition: 'all'},
'bower_components/jquery/dist/jquery.min.js',
'bower_components/chartjs/Chart.js',
'bower_components/lodash/lodash.js',
'bower_components/q/q.js',
'bower_components/clipboard/dist/clipboard.min.js'
],
loadStyles: [
'css/visualize.css',
'css/visualize-dark.css'
]
});
</script>
<!-- list -->
<script src="js/list.js"></script>
</head>
<body onload="start();">
<h1>MySQL Slow Query Log Visualizer</h1>
<em>If you need to process very large files (>500MB), you will have to call Chrome with <strong>--js-flags="--max-old-space-size=5000"</strong> parameter to increase memory allocatable by Chrome to 5GB</em>
<div id="drop_zone">Drop log file here</div>
<output id="drop_result"></output>
<output id="load_progress"></output>
<output id="load_result"></output>
<div id="global_chart_container" class="chart_container" width="100%" style="display: none">
<h2>GLOBAL CHART (click twice on graph to define working data)</h2>
<span id="global_chart_queries_count"></span><br/>
Time scale : <select id="global_time_scale">
<option value="minutely">Minutely</option>
<option value="hourly" selected>Hourly</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
</select><br/>
<canvas id="globalChart" class="chart" width="1280px" height="600"></canvas>
</div>
<br /><br />
<div id="working_chart_container" class="chart_container" width="100%" style="display: none">
<h2>WORKING CHART (click twice on graph to define new working data)</h2>
<span id="working_chart_queries_count"></span><br/>
Time scale : <select id="working_time_scale">
<option value="minutely">Minutely</option>
<option value="hourly" selected>Hourly</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
</select><br/>
<canvas id="workingChart" class="chart" width="1280px" height="600"></canvas>
</div>
<br /><br />
<div id="query_results" style="display:none">
Chart filtering : start=<span id="filterStart"></span>, end=<span id="filterEnd"></span>
<table id="log_list">
<thead class="header">
<tr id="search">
<th colspan="10">
<span class="list_search">
<span id="search_count"></span>
<label for="log_list_search">Filter:</label>
<input id="log_list_search" class="search" />
<input type="checkbox" class="reverseSearch" />Invert
</span>
</th>
</tr>
<tr>
<th scope="col" class="sort" data-sort="date">date</th>
<th scope="col" class="sort" data-sort="query_time">query time</th>
<th scope="col" class="sort" data-sort="lock_time">lock time</th>
<th scope="col" class="sort" data-sort="rows_sent">rows sent</th>
<th scope="col" class="sort" data-sort="rows_examined">rows examined</th>
<th scope="col" class="sort" data-sort="db_name">db name</th>
<th scope="col" class="sort" data-sort="query_pattern_filtered_occurences">query pattern on working data</th>
<th scope="col" class="sort" data-sort="query_pattern_global_occurences">query pattern on global data</th>
<th scope="col" class="sort" data-sort="query_string">query string</th>
<th scope="col" class="sort" data-sort="displayed_query_with_stripped_where_clauses">query with stripped where clauses</th>
</tr>
</thead>
<tbody class="list"></tbody>
<tfoot>
<tr id="log_list_item">
<th scope="row" class="date"></th>
<td class="query_time"></td>
<td class="lock_time"></td>
<td class="rows_sent"></td>
<td class="rows_examined"></td>
<td class="db_name"></td>
<td class="query_pattern_filtered_occurences"></td>
<td class="query_pattern_global_occurences"></td>
<td class="qs"><pre class="query_string"></pre></td>
<td class="qs"><pre class="displayed_query_with_stripped_where_clauses"></pre></td>
</tr>
</tfoot>
</table>
</div>
<p class="credits">MySQL Slow Query Log Visualizer © 2015 <a href="http://www.4sh.fr">4SH</a> and <a href="http://www.neurofuzzy.net">Neurofuzzy Consulting</a></p>
</body>
</html>