File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
templates/debug_toolbar/panels Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,10 @@ def content(self):
183
183
query ['rgb_color' ] = self ._databases [alias ]['rgb_color' ]
184
184
try :
185
185
query ['width_ratio' ] = (query ['duration' ] / self ._sql_time ) * 100
186
+ query ['width_ratio_relative' ] = 100.0 * query ['width_ratio' ] / (100.0 - width_ratio_tally )
186
187
except ZeroDivisionError :
187
188
query ['width_ratio' ] = 0
189
+ query ['width_ratio_relative' ] = 0
188
190
query ['start_offset' ] = width_ratio_tally
189
191
query ['end_offset' ] = query ['width_ratio' ] + query ['start_offset' ]
190
192
width_ratio_tally += query ['width_ratio' ]
Original file line number Diff line number Diff line change 35
35
</ div >
36
36
</ td >
37
37
< td class ="timeline ">
38
- < div class ="djDebugTimeline "> < div class ="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %} " style ="left:{{ query.start_offset|dotted_number }}%; "> < strong style ="width:{{ query.width_ratio |dotted_number }}%; "> {{ query.width_ratio }}%</ strong > </ div > </ div >
38
+ < div class ="djDebugTimeline "> < div class ="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %} " style ="left:{{ query.start_offset|dotted_number }}%; "> < strong style ="width:{{ query.width_ratio_relative |dotted_number }}%; "> {{ query.width_ratio }}%</ strong > </ div > </ div >
39
39
</ td >
40
40
< td class ="time ">
41
41
{{ query.duration|floatformat:"2" }}
You can’t perform that action at this time.
0 commit comments