Welcome to mirror list, hosted at ThFree Co, Russian Federation.

profiling_chart.twig « sql « templates - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a400dab642805717af63fc8ffdad31c522a497c (plain)
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
<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' %}
          <div class="sorticon"></div>
        </th>
        <th>
          {% trans 'Time' %}
          <div class="sorticon"></div>
        </th>
      </tr>
      </thead>
      <tbody>
        {% 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>

  <div class="floatleft">
    <h3>{% trans 'Summary by state' %}{{ show_mysql_docu('general-thread-states') }}</h3>
    <table id="profilesummarytable">
      <thead>
      <tr>
        <th>
          {% trans 'State' %}
          <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 profiling.states %}
          <tr>
            <td>{{ name }}</td>
            <td class="text-right">
              {{ format_number(stats.total_time, 3, 1) }}s
              <span class="rawvalue hide">{{ stats.total_time }}</span>
            </td>
            <td class="text-right">
              {{ format_number(100 * (stats.total_time / profiling.total_time), 0, 2) }}%
            </td>
            <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, '.', '') }}
              </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">
    {{- profiling.chart|json_encode() -}}
  </div>
  <div id="profilingchart" class="hide"></div>

  <script type="text/javascript">
    AJAX.registerOnload('sql.js', function () {
      Sql.makeProfilingChart();
      Sql.initProfilingTables();
    });
  </script>
</fieldset>