aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/templates/sql/profiling_chart.twig
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/phpmyadmin/templates/sql/profiling_chart.twig')
-rw-r--r--srcs/phpmyadmin/templates/sql/profiling_chart.twig97
1 files changed, 97 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/templates/sql/profiling_chart.twig b/srcs/phpmyadmin/templates/sql/profiling_chart.twig
new file mode 100644
index 0000000..0f80954
--- /dev/null
+++ b/srcs/phpmyadmin/templates/sql/profiling_chart.twig
@@ -0,0 +1,97 @@
+<fieldset>
+ <legend>{% trans 'Profiling' %}</legend>
+ <div class="floatleft">
+ <h3>{% trans 'Detailed profile' %}</h3>
+ <table id="profiletable">
+ <thead>
+ <tr>
+ <th>
+ {% trans 'Order' %}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans 'State' %}
+ {{ show_mysql_docu('general-thread-states') }}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans 'Time' %}
+ <div class="sorticon"></div>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ detailed_table|raw }}
+ </tbody>
+ </table>
+ </div>
+
+ <div class="floatleft">
+ <h3>{% trans 'Summary by state' %}</h3>
+ <table id="profilesummarytable">
+ <thead>
+ <tr>
+ <th>
+ {% trans 'State' %}
+ {{ show_mysql_docu('general-thread-states') }}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans 'Total Time' %}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans '% Time' %}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans 'Calls' %}
+ <div class="sorticon"></div>
+ </th>
+ <th>
+ {% trans 'ΓΈ Time' %}
+ <div class="sorticon"></div>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for name, stats in states %}
+ <tr>
+ <td>{{ name }}</td>
+ <td align="right">
+ {{ format_number(stats['total_time'], 3, 1) }}s
+ <span class="rawvalue hide">{{ stats['total_time'] }}</span>
+ </td>
+ <td align="right">
+ {{ format_number(100 * (stats['total_time'] / total_time), 0, 2) }}%
+ </td>
+ <td align="right">{{ stats['calls'] }}</td>
+ <td align="right">
+ {{ format_number(stats['total_time'] / stats['calls'], 3, 1) }}s
+ <span class="rawvalue hide">
+ {{ (stats['total_time'] / stats['calls'])|number_format(8, '.', '') }}
+ </span>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ <script type="text/javascript">
+ url_query = '{{ url_query }}';
+ </script>
+ </div>
+ <div class='clearfloat'></div>
+
+ <div id="profilingChartData" class="hide">
+ {{ chart_json|json_encode() }}
+ </div>
+ <div id="profilingchart" class="hide"></div>
+
+ <script type="text/javascript">
+ AJAX.registerOnload('sql.js', function () {
+ Sql.makeProfilingChart();
+ Sql.initProfilingTables();
+ });
+ </script>
+</fieldset>