Skip to content

Commit 44dae7f

Browse files
committed
* New visualizer total db time as well as request time including percentage of the request time
1 parent 72fe209 commit 44dae7f

File tree

3 files changed

+81
-9
lines changed

3 files changed

+81
-9
lines changed

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"format:check":"cfformat check appenders,aspects,handlers,interceptors,models,test-harness/tests/**.cfc,ModuleConfig.cfc",
5858
"cfpm":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\"' | run",
5959
"cfpm:install":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\" install ${1}' | run",
60-
"install:2021":"run-script cfpm:install zip,debugger,orm,mysql,postgresql,sqlserver,feed",
60+
"install:2021":"run-script cfpm:install zip,debugger,orm,mysql,postgresql,sqlserver,feed,chart",
6161
"install:dependencies":"install && cd test-harness && install",
6262
"start:lucee":"server start [email protected]",
6363
"start:2016":"server start [email protected]",

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
* New life-cycle events: onDebuggerUnload, onDebuggerLoad
2020
* Ability for the custom `timeIt()` functions to accept metdata to store in the execution timer
2121
* New `Slowest` Queries panel for cborm, acf, and qb/quick
22+
* New visualizer total db time as well as request time including percentage of the request time
2223

2324
### Fixed
2425

2526
* Timer service reconstructing the timer hashes and profilers twice.
2627
* `timeIt()` helper was not passing the closure correctly
28+
* If doing a fwreinit on the visualizer, the current profiler was still being show even thought it was empty. Add an empty check to avoid the big bang!
29+
* Empty response codes for Adobe, due to their incredibly weird Response object nesting.
2730

2831
### Changed
2932

views/main/partials/profilers.cfm

Lines changed: 77 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,59 @@
1111
Timestamp<br>
1212
Ip
1313
</th>
14+
1415
<th align="left" width="150">
1516
Server Info
1617
</th>
18+
1719
<th align="left" width="75">
1820
Response
1921
</th>
22+
2023
<th align="left">
2124
Request
2225
</th>
26+
2327
<th width="100" title="Free memory difference between start and end of the request">
24-
Free Memory
28+
Memory Diff
2529
</th>
26-
<th width="50">
30+
31+
<cfif args.debuggerConfig.cborm.enabled>
32+
<th width="65">
33+
cborm
34+
<br>
35+
time + %
36+
</th>
37+
</cfif>
38+
39+
<cfif args.debuggerConfig.acfSql.enabled>
40+
<th width="65">
41+
ACF SQL
42+
<br>
43+
time + %
44+
</th>
45+
</cfif>
46+
47+
<cfif args.debuggerConfig.qb.enabled>
48+
<th width="65">
49+
QB
50+
<br>
51+
time + %
52+
</th>
53+
</cfif>
54+
55+
<th width="65">
2756
Time<br>
2857
(ms)
2958
</th>
59+
3060
<th width="50">
3161
Actions
3262
</th>
3363
</tr>
3464

3565
<cfloop array="#args.profilers#" index="thisProfiler">
66+
3667
<tr
3768
@dblclick="loadProfilerReport( '#thisProfiler.id#' )"
3869
<cfif thisProfiler.response.statusCode gte 400>class="cbd-bg-light-red"</cfif>
@@ -91,6 +122,7 @@
91122
<cfelseif thisProfiler.response.statusCode gte 400>
92123
<span class="cbd-text-red">
93124
#thisProfiler.response.statusCode#
125+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
94126
</span>
95127
</cfif>
96128
</div>
@@ -132,15 +164,52 @@
132164
</cfif>
133165
</td>
134166

167+
<!--- CBORM Time --->
168+
<cfif args.debuggerConfig.cborm.enabled>
169+
<td align="right">
170+
<cfset timerClass = thisProfiler.cborm.totalExecutionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold ? "cbd-text-red" : "">
171+
<span class="#timerClass#">
172+
#numberFormat( thisProfiler.cborm.totalExecutionTime )# ms
173+
<br>
174+
<span title="Percentage of total request time">
175+
#numberFormat( (thisProfiler.cborm.totalExecutionTime / thisProfiler.executionTime) * 100, "0.00" )#%
176+
</span>
177+
</span>
178+
</td>
179+
</cfif>
180+
181+
<!--- CFSQL Time --->
182+
<cfif args.debuggerConfig.acfSql.enabled>
183+
<td align="right">
184+
<cfset timerClass = thisProfiler.cfQueries.totalExecutionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold ? "cbd-text-red" : "">
185+
<span class="#timerClass#">
186+
#numberFormat( thisProfiler.cfQueries.totalExecutionTime )# <br>
187+
<span title="Percentage of total request time">
188+
#numberFormat( thisProfiler.cfQueries.totalExecutionTime / thisProfiler.executionTime, "00.00" )#%
189+
</span>
190+
</span>
191+
</td>
192+
</cfif>
193+
194+
<!--- QB Time --->
195+
<cfif args.debuggerConfig.qb.enabled>
196+
<td align="right">
197+
<cfset timerClass = thisProfiler.qbQueries.totalExecutionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold ? "cbd-text-red" : "">
198+
<span class="#timerClass#">
199+
#numberFormat( thisProfiler.qbQueries.totalExecutionTime )# <br>
200+
<span title="Percentage of total request time">
201+
#numberFormat( thisProfiler.qbQueries.totalExecutionTime / thisProfiler.executionTime, "00.00" )#%
202+
</span>
203+
</span>
204+
</td>
205+
</cfif>
206+
135207
<!--- Execution Time --->
136208
<td align="right">
137-
<cfif thisProfiler.executionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold>
138-
<span class="cbd-text-red">
139-
#numberFormat( thisProfiler.executionTime )#
140-
</span>
141-
<cfelse>
209+
<cfset timerClass = thisProfiler.executionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold ? "cbd-text-red" : "">
210+
<span class="#timerClass#">
142211
#numberFormat( thisProfiler.executionTime )#
143-
</cfif>
212+
</span>
144213
</td>
145214

146215
<!--- ACTIONS --->

0 commit comments

Comments
 (0)