xo::remap_pool (private)
xo::remap_pool [ -threshold threshold ] [ -except except ] \ [ -pool pool ] [ -runtime runtime ] method url
Defined in packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl
Function for dynamically managing connection pool mappings. When a connection pool "slow", is defined, and the query took longer than "threshold" seconds, and the URL is not 'except' list, then move this request to the "slow" pool.
- Switches:
- -threshold
(defaults to"3.0"
) (optional)- -except
(defaults to"/ /dotlrn/ /dotlrn"
) (optional)- -pool
(defaults to"slow"
) (optional)- -runtime
(optional)- Parameters:
- method
url
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$runtime > $threshold && [::acs::icanuse "ns_server unmap"] && $pool in [ns_server pools] && [ns_server mapped [list $method $url]] eq "" && $url ni $except } { ns_server -pool $pool map -noinherit [list $method $url] ns_log notice "slow request: '$url' moved to '$pool' connection pool" # # In case, we are executing in the throttle monitor thread, call # the register unmap function directly, otherwise instruct the # monitor thread to do so. # set prefix [expr {[ns_thread name] eq "::throttle" ? {} : {::throttle do}}] {*}$prefix ::unmap_pool -pool $pool $method $url }XQL Not present: Generic, PostgreSQL, Oracle