Index: openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl,v diff -u -r1.43.2.11 -r1.43.2.12 --- openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 30 Jan 2017 11:29:51 -0000 1.43.2.11 +++ openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 30 Jan 2017 12:00:16 -0000 1.43.2.12 @@ -185,7 +185,7 @@ } Throttle instproc throttle_check {requestKey pa url conn_time content_type community_id} { - set t0 [clock milliseconds] + #set t0 [clock milliseconds] seconds ++ @@ -208,13 +208,13 @@ set $var $conn_time #ns_log notice "### new $var" } - set t1 [clock milliseconds] + #set t1 [clock milliseconds] :register_access $requestKey $pa $url $community_id $is_embedded_request - set t2 [clock milliseconds] + #set t2 [clock milliseconds] - if {$t2 - $t0 > 500} { - ns_log warning "throttle_check slow, can lead to filter time >1sec: total time [expr {$t2 - $t0}], t1 [expr {$t1 - $t0}]" - } + #if {$t2 - $t0 > 500} { + # ns_log warning "throttle_check slow, can lead to filter time >1sec: total time [expr {$t2 - $t0}], t1 [expr {$t1 - $t0}]" + #} # # Allow up to 14 requests to be executed concurrently.... the @@ -831,15 +831,14 @@ set :user_in_community($key) $data #ns_log notice "=== user $key left community $community_id at $now reason $reason after $seconds seconds clicks $clicks" if {[do_track_activity] && $seconds > 0} { - set t0 [clock milliseconds] + #set t0 [clock milliseconds] ns_job queue -detached async-cmd \ [list ::xo::request_monitor_record_community_activity $key $pa $community_id $seconds $clicks $reason] - set t1 [clock milliseconds] - if {$t1 - $t0 > 500} { - ns_log warning "request_monitor_record_community_activity left_community slow, can lead to filter time >1sec: total time [expr {$t1 - $t0}]" - } + #set t1 [clock milliseconds] + #if {$t1 - $t0 > 500} { + # ns_log warning "request_monitor_record_community_activity left_community slow, can lead to filter time >1sec: total time [expr {$t1 - $t0}]" + #} } - set t1 [clock milliseconds] } Users proc left_system {key pa now data reason} { @@ -858,13 +857,13 @@ } ns_log notice "=== user $key left system at $now reason $reason after $seconds seconds clicks $clicks" if {[do_track_activity] && $seconds > 0} { - set t0 [clock milliseconds] + #set t0 [clock milliseconds] ns_job queue -detached async-cmd \ [list ::xo::request_monitor_record_activity $key $pa $seconds $clicks $reason] - set t1 [clock milliseconds] - if {$t1 - $t0 > 500} { - ns_log warning "::xo::request_monitor_record_activity left_system slow, can lead to filter time >1sec: total time [expr {$t1 - $t0}]" - } + #set t1 [clock milliseconds] + #if {$t1 - $t0 > 500} { + # ns_log warning "::xo::request_monitor_record_activity left_system slow, can lead to filter time >1sec: total time [expr {$t1 - $t0}]" + #} } catch {unset :user_in_community($key)} catch {unset :refcount($key)} @@ -1510,15 +1509,15 @@ It should be called after authentication such we have already the userid if the user is authenticated } { - set t0 [clock milliseconds] + #set t0 [clock milliseconds] :get_context # :log "### check" lassign [:throttle_check ${:requestor} ${:pa} ${:url} \ [ns_conn start] [ns_guesstype [ns_conn url]] ${:community_id}] \ toMuch ms repeat - set t1 [clock milliseconds] + #set t1 [clock milliseconds] if {$repeat} { :add_statistics repeat ${:requestor} ${:pa} ${:url} ${:query} @@ -1536,10 +1535,10 @@ } else { set result 0 } - set tend [clock milliseconds] - if {$tend - $t0 > 500} { - ns_log warning "throttle_filter slow, can lead to filter time >1sec: total time [expr {$tend - $t0}], t1 [expr {$t1 - $t0}]" - } + #set tend [clock milliseconds] + #if {$tend - $t0 > 500} { + # ns_log warning "throttle_filter slow, can lead to filter time >1sec: total time [expr {$tend - $t0}], t1 [expr {$t1 - $t0}]" + #} return $result }