ds_get_db_command_info (private)

 ds_get_db_command_info

Defined in packages/acs-developer-support/tcl/acs-developer-support-procs.tcl

Get a Tcl list with { num_commands total_ms } for the database commands for the request.

Returns:
list containing num_commands and total_ms, or empty string if the information is not available.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-developer-support/lib/toolbar.tcl packages/acs-developer-support/ lib/toolbar.tcl ds_get_db_command_info ds_get_db_command_info packages/acs-developer-support/lib/toolbar.tcl->ds_get_db_command_info ds_collection_enabled_p ds_collection_enabled_p (public) ds_get_db_command_info->ds_collection_enabled_p ds_enabled_p ds_enabled_p (public) ds_get_db_command_info->ds_enabled_p

Testcases:
No testcase defined.
Source code:
    set result {}
    if { [ds_enabled_p] && [ds_collection_enabled_p] } {
        if { [nsv_exists ds_request $::ad_conn(request).db] } {
            set total 0
            set counter 0
            foreach { handle command statement_name sql start end errno error } [nsv_get ds_request $::ad_conn(request).db] {
                set total [expr { $total + ($end - $start) }]
                if { [lindex $command 0] in { dml exec 1row 0or1row select } } {
                    incr counter
                }
            }
            set result [list $counter $total]
        }
    }
    return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: