diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-09 10:55:03 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-09 13:09:38 +0100 |
| commit | 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa (patch) | |
| tree | 5c691241355c943a3c68ddb06b8cf8c60aa11319 /srcs/phpmyadmin/templates/sql/profiling_chart.twig | |
| parent | 7e0d85db834d6351ed85d01e5126ac31dc510b86 (diff) | |
| download | ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.gz ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.bz2 ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.zip | |
phpmyadmin working
Diffstat (limited to 'srcs/phpmyadmin/templates/sql/profiling_chart.twig')
| -rw-r--r-- | srcs/phpmyadmin/templates/sql/profiling_chart.twig | 97 |
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> |
