|
101 | 101 | </div>
|
102 | 102 | </td>
|
103 | 103 | <td>
|
104 |
| - <code> |
| 104 | + <code id="cborm-groupsql-#sqlHash#"> |
| 105 | + <svg |
| 106 | + xmlns="http://www.w3.org/2000/svg" |
| 107 | + class="h-6 w-6 cbd-floatRight cbd-text-pre mt5" |
| 108 | + fill="none" |
| 109 | + viewBox="0 0 24 24" |
| 110 | + stroke="currentColor" |
| 111 | + title="Copy SQL to Clipboard" |
| 112 | + style="width: 50px; height: 50px; cursor: pointer;" |
| 113 | + onclick="copyToClipboard( 'cborm-groupsql-#sqlHash#' )" |
| 114 | + > |
| 115 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /> |
| 116 | + </svg> |
105 | 117 | #sqlFormatter.formatSql(
|
106 | 118 | args.profiler.cborm.grouped[ sqlHash ].sql
|
107 | 119 | )#
|
|
123 | 135 | </thead>
|
124 | 136 | <tbody>
|
125 | 137 | <cfloop array="#args.profiler.cborm.grouped[ sqlHash ].records#" index="q">
|
| 138 | + <cfset q.id = createUUID()> |
126 | 139 | <tr>
|
127 | 140 | <td align="center">
|
128 | 141 | #TimeFormat( q.timestamp, "hh:MM:SS.l tt" )#
|
|
134 | 147 | #q.type#
|
135 | 148 | </td>
|
136 | 149 | <td>
|
| 150 | + |
| 151 | + <!--- Show Template Caller if not empty ---> |
137 | 152 | <cfif q.caller.template.len()>
|
138 | 153 | <div class="mb10 mt10 cbd-params">
|
139 | 154 | <!--- Title --->
|
|
163 | 178 | </div>
|
164 | 179 | </cfif>
|
165 | 180 |
|
| 181 | + <!--- Params ---> |
166 | 182 | <cfif NOT q.params.isEmpty()>
|
167 |
| - <code><pre>#jsonFormatter.formatJSON( json : q.params, spaceAfterColon : true )#</pre></code> |
| 183 | + <code id="cborm-groupsql-params-#q.id#"> |
| 184 | + <svg |
| 185 | + xmlns="http://www.w3.org/2000/svg" |
| 186 | + class="h-6 w-6 cbd-floatRight cbd-text-pre mt5" |
| 187 | + fill="none" |
| 188 | + viewBox="0 0 24 24" |
| 189 | + stroke="currentColor" |
| 190 | + title="Copy Params to Clipboard" |
| 191 | + style="width: 50px; height: 50px; cursor: pointer;" |
| 192 | + onclick="copyToClipboard( 'cborm-groupsql-params-#q.id#' )" |
| 193 | + > |
| 194 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /> |
| 195 | + </svg> |
| 196 | + <pre>#jsonFormatter.formatJSON( json : q.params, spaceAfterColon : true )#</pre> |
| 197 | + </code> |
168 | 198 | </cfif>
|
169 | 199 | </td>
|
170 | 200 | </tr>
|
|
184 | 214 | <table border="0" align="center" cellpadding="0" cellspacing="1" class="cbd-tables">
|
185 | 215 | <thead>
|
186 | 216 | <tr>
|
187 |
| - <th width="125">Timestamp</th> |
188 |
| - <th width="100">Type</th> |
189 |
| - <th>Query</th> |
| 217 | + <th width="125" align="center">Timestamp</th> |
| 218 | + <th width="100" align="center">Type</th> |
190 | 219 | <th width="100" align="center">Execution Time</th>
|
| 220 | + <th>Query</th> |
191 | 221 | </tr>
|
192 | 222 | </thead>
|
| 223 | + |
193 | 224 | <tbody>
|
194 | 225 | <cfloop array="#args.profiler.cborm.all#" index="q">
|
| 226 | + <cfset q.id = createUUID()> |
195 | 227 | <tr>
|
196 | 228 | <td align="center">
|
197 | 229 | #TimeFormat( q.timestamp,"hh:MM:SS.l tt" )#
|
198 | 230 | </td>
|
| 231 | + |
199 | 232 | <td align="center">
|
200 | 233 | #q.type#
|
201 | 234 | </td>
|
| 235 | + |
| 236 | + <td align="center"> |
| 237 | + #q.executionTime# ms |
| 238 | + </td> |
| 239 | + |
202 | 240 | <td>
|
203 | 241 | <cfif q.caller.template.len()>
|
204 | 242 | <div class="mb10 mt10 cbd-params">
|
205 | 243 | <!--- Title --->
|
206 | 244 | <strong>Called From: </strong>
|
| 245 | + |
207 | 246 | <!--- Open in Editor--->
|
208 | 247 | <cfif exceptionBean.openInEditorURL( event, q.caller ) NEQ "">
|
209 | 248 | <div class="cbd-floatRight">
|
|
220 | 259 | </a>
|
221 | 260 | </div>
|
222 | 261 | </cfif>
|
| 262 | + |
223 | 263 | <!--- Line --->
|
224 | 264 | <div>
|
225 | 265 | <strong>
|
|
229 | 269 | </div>
|
230 | 270 | </cfif>
|
231 | 271 |
|
232 |
| - <code>#sqlFormatter.formatSql( q.sql )#</code> |
| 272 | + <!--- Formatted SQL ---> |
| 273 | + <code id="cborm-timelinesql-#q.id#"> |
| 274 | + <svg |
| 275 | + xmlns="http://www.w3.org/2000/svg" |
| 276 | + class="h-6 w-6 cbd-floatRight cbd-text-pre mt5" |
| 277 | + fill="none" |
| 278 | + viewBox="0 0 24 24" |
| 279 | + stroke="currentColor" |
| 280 | + title="Copy SQL to Clipboard" |
| 281 | + style="width: 50px; height: 50px; cursor: pointer;" |
| 282 | + onclick="copyToClipboard( 'cborm-timelinesql-#q.id#' )" |
| 283 | + > |
| 284 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /> |
| 285 | + </svg> |
| 286 | + #sqlFormatter.formatSql( q.sql )# |
| 287 | + </code> |
233 | 288 |
|
| 289 | + <!--- Binding Params ---> |
234 | 290 | <cfif NOT q.params.isEmpty()>
|
235 | 291 | <div class="mt10 mb5 cbd-params">
|
236 | 292 | <div class="mb10">
|
237 | 293 | <strong>Params: </strong>
|
238 | 294 | </div>
|
239 |
| - <code><pre>#jsonFormatter.formatJSON( json : q.params, spaceAfterColon : true )#</pre></code> |
| 295 | + <code id="cborm-timelinesql-params-#q.id#"> |
| 296 | + <svg |
| 297 | + xmlns="http://www.w3.org/2000/svg" |
| 298 | + class="h-6 w-6 cbd-floatRight cbd-text-pre mt5" |
| 299 | + fill="none" |
| 300 | + viewBox="0 0 24 24" |
| 301 | + stroke="currentColor" |
| 302 | + title="Copy SQL to Clipboard" |
| 303 | + style="width: 50px; height: 50px; cursor: pointer;" |
| 304 | + onclick="copyToClipboard( 'cborm-timelinesql-params-#q.id#' )" |
| 305 | + > |
| 306 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /> |
| 307 | + </svg> |
| 308 | + <pre>#jsonFormatter.formatJSON( json : q.params, spaceAfterColon : true )#</pre> |
| 309 | + </code> |
240 | 310 | </div>
|
241 | 311 | </cfif>
|
242 | 312 | </td>
|
243 |
| - <td align="center"> |
244 |
| - #q.executionTime# ms |
245 |
| - </td> |
246 | 313 | </tr>
|
247 | 314 | </cfloop>
|
248 | 315 | </tbody>
|
|
271 | 338 | #args.profiler.cborm.totalQueries#
|
272 | 339 | </td>
|
273 | 340 | </tr>
|
274 |
| - <cfset stats = args.profiler.cborm.sessionStats.keyArray()> |
275 |
| - <cfset stats.sort( "textnocase" )> |
276 |
| - <cfloop array="#stats#" item="thisItem" > |
277 |
| - <tr> |
278 |
| - <th width="200" align="right"> |
279 |
| - #thisItem# : |
280 |
| - </th> |
281 |
| - <td> |
282 |
| - #args.profiler.cborm.sessionStats[ thisItem ]# |
283 |
| - </td> |
284 |
| - </tr> |
285 |
| - </cfloop> |
| 341 | + <tr> |
| 342 | + <th width="200" align="right"> |
| 343 | + Total Execution Time: |
| 344 | + </th> |
| 345 | + <td> |
| 346 | + #args.profiler.cborm.totalExecutionTime# |
| 347 | + </td> |
| 348 | + </tr> |
| 349 | + <tr> |
| 350 | + <th width="200" align="right"> |
| 351 | + Collection Count: |
| 352 | + </th> |
| 353 | + <td> |
| 354 | + #args.profiler.cborm.sessionStats.collectionCount# |
| 355 | + </td> |
| 356 | + </tr> |
| 357 | + <tr> |
| 358 | + <th width="200" align="right"> |
| 359 | + Entity Count: |
| 360 | + </th> |
| 361 | + <td> |
| 362 | + #args.profiler.cborm.sessionStats.entityCount# |
| 363 | + </td> |
| 364 | + </tr> |
286 | 365 | </table>
|
287 | 366 | </div>
|
288 | 367 | </div>
|
|
0 commit comments