- Timestamp:
- 01/07/2008 18:06:44 (5 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
bMotion.tcl (modified) (1 diff)
-
modules/abstract.tcl (modified) (4 diffs)
-
modules/events.tcl (modified) (3 diffs)
-
modules/flood.tcl (modified) (1 diff)
-
modules/system.tcl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bMotion.tcl
r884 r939 78 78 source "$bMotionModules/variables.tcl" 79 79 80 # load counters81 if {$bMotion_testing == 1} {82 putlog "... loading counters"83 }84 source "$bMotionModules/counters.tcl"85 86 80 # load settings 87 81 if {$bMotion_testing == 1} { -
trunk/modules/abstract.tcl
r937 r939 89 89 } 90 90 91 #init our counters92 bMotion_counter_init "abstracts" "faults"93 bMotion_counter_init "abstracts" "pageouts"94 bMotion_counter_init "abstracts" "gc"95 bMotion_counter_init "abstracts" "gets"96 97 91 set bMotion_abstract_dir "$bMotionLocal/abstracts/$bMotionInfo(language)" 98 92 … … 106 100 107 101 bMotion_putloglev 2 * "Garbage collecting abstracts..." 108 109 bMotion_counter_incr "abstracts" "gc"110 102 111 103 set abstracts [array names bMotion_abstract_contents] … … 123 115 set bMotion_abstract_timestamps($abstract) 0 124 116 lappend bMotion_abstract_ondisk $abstract 125 bMotion_counter_incr "abstracts" "pageouts"126 117 } 127 118 } … … 385 376 } 386 377 387 bMotion_counter_incr "abstracts" "gets"388 389 378 if {$bMotion_abstract_timestamps($abstract) < [expr [clock seconds] - $bMotion_abstract_max_age]} { 390 379 bMotion_putloglev d * "abstract $abstract has been unloaded, reloading..." 391 bMotion_counter_incr "abstracts" "faults"392 380 bMotion_abstract_load $abstract 393 381 } -
trunk/modules/events.tcl
r937 r939 227 227 set bMotionLastEvent($channel) [clock seconds] 228 228 229 bMotion_counter_incr "events" "lines"230 231 229 #don't let people break us <<<2 232 230 if {![matchattr $handle n]} { … … 285 283 if [bMotion_flood_check $nick] { return 0 } 286 284 set nick [bMotionGetRealName $nick $host] 287 bMotion_counter_incr "events" "simpleplugins"288 285 bMotionDoAction $channel $nick [pickRandom $response] 289 286 return 0 … … 301 298 bMotion_putloglev 1 * "bMotion: `- running callback $callback" 302 299 set result 0 303 bMotion_counter_incr "events" "complexplugins"304 300 set result [$callback $nick $host $handle $channel $text] 305 301 set bMotionCache(lastPlugin) $callback -
trunk/modules/flood.tcl
r937 r939 240 240 if {!($r < $chance)} { 241 241 putlog "bMotion: FLOOD check on $nick (http://www.bmotion.net:8000/bmotion/wiki/FAQDisableFlood)" 242 bMotion_counter_incr "flood" "checks"243 242 return 1 244 243 } -
trunk/modules/system.tcl
r937 r939 91 91 set mem [llength [array names bMotion_abstract_contents]] 92 92 set disk [llength $bMotion_abstract_ondisk] 93 set faults [bMotion_counter_get "abstracts" "faults"]94 set pageouts [bMotion_counter_get "abstracts" "pageouts"]95 93 global bMotionFacts 96 94 set items [lsort [array names bMotionFacts]] … … 102 100 } 103 101 104 putchan $channel "abstracts: [expr $mem + $disk] total, $mem loaded, $disk on disk , $faults faults, $pageouts pageouts. [bMotion_counter_get abstracts gc] garbage collections, [bMotion_counter_get abstracts gets] fetches"102 putchan $channel "abstracts: [expr $mem + $disk] total, $mem loaded, $disk on disk" 105 103 putchan $channel "facts: $factcount facts about $itemcount items" 106 putchan $channel "plugins fired: simple [bMotion_counter_get events simpleplugins], complex [bMotion_counter_get events complexplugins]"107 putchan $channel "output: lines sent to output: [bMotion_counter_get output lines], lines sent to irc: [bMotion_counter_get output irclines]"108 putchan $channel "system: randomness: [bMotion_counter_get system randomstuff]"109 putchan $channel "flood: checks: [bMotion_counter_get flood checks]"110 104 } 111 105
