diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-08-26 02:31:15 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-08-26 02:31:15 +0300 |
commit | e7e9bd770fde55ff610ad2a3c61d48d02ec10e46 (patch) | |
tree | 17892ee5d238ae409e0793273de317bb74eb3b1d /templates/sql | |
parent | 99abf3ab3cfa19a3d1c9bc7b1c1c793f8b0c8b0f (diff) |
Remove the Sql::getHtmlForProfilingChart method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'templates/sql')
-rw-r--r-- | templates/sql/detailed_table.twig | 8 | ||||
-rw-r--r-- | templates/sql/profiling_chart.twig | 33 |
2 files changed, 21 insertions, 20 deletions
diff --git a/templates/sql/detailed_table.twig b/templates/sql/detailed_table.twig deleted file mode 100644 index 4d8fe9ce4a..0000000000 --- a/templates/sql/detailed_table.twig +++ /dev/null @@ -1,8 +0,0 @@ -<tr> - <td>{{ index }}</td> - <td>{{ status|title }}</td> - <td class="right"> - {{ format_number(duration, 3, 1) }}s - <span class="rawvalue hide">{{ duration }}</span> - </td> -</tr> diff --git a/templates/sql/profiling_chart.twig b/templates/sql/profiling_chart.twig index 5ad1ea84dc..3a400dab64 100644 --- a/templates/sql/profiling_chart.twig +++ b/templates/sql/profiling_chart.twig @@ -20,7 +20,16 @@ </tr> </thead> <tbody> - {{ detailed_table|raw }} + {% for state in profiling.profile %} + <tr> + <td>{{ loop.index }}</td> + <td>{{ state.status }}</td> + <td class="text-right"> + {{ state.duration }}s + <span class="rawvalue hide">{{ state.duration_raw }}</span> + </td> + </tr> + {% endfor %} </tbody> </table> </div> @@ -53,21 +62,21 @@ </tr> </thead> <tbody> - {% for name, stats in states %} + {% for name, stats in profiling.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 class="text-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 class="text-right"> + {{ format_number(100 * (stats.total_time / profiling.total_time), 0, 2) }}% </td> - <td align="right">{{ stats['calls'] }}</td> - <td align="right"> - {{ format_number(stats['total_time'] / stats['calls'], 3, 1) }}s + <td class="text-right">{{ stats.calls }}</td> + <td class="text-right"> + {{ format_number(stats.total_time / stats.calls, 3, 1) }}s <span class="rawvalue hide"> - {{ (stats['total_time'] / stats['calls'])|number_format(8, '.', '') }} + {{ (stats.total_time / stats.calls)|number_format(8, '.', '') }} </span> </td> </tr> @@ -82,7 +91,7 @@ <div class='clearfloat'></div> <div id="profilingChartData" class="hide"> - {{ chart_json|json_encode() }} + {{- profiling.chart|json_encode() -}} </div> <div id="profilingchart" class="hide"></div> |