Permalink
Browse files

if we read nothing, report everything as 0

  • Loading branch information...
1 parent dd83afb commit bd36e367a3e50503b544e48252b4805778a06629 @ryanking ryanking committed with jkalucki Jan 15, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/jvm-gc-stats.rb
View
@@ -6,6 +6,8 @@
TAIL_ONLY = false
TAIL_SLEEP_SEC = 1
TAIL_BLOCK_SIZE = 2048
+ALL_MEASUREMENTS = %w[promoFail.realSec major.concur.userSec major.concur.realSec major.block.userSec] +
+ %w[%s.survivalRatio %s.kbytesPerSec %s.userSec %s.realSec].collect{|m| %w[minor full].collect{|s| m % s}}.flatten
def tail(file)
f = File.new(file, "r")
@@ -19,7 +21,9 @@ def tail(file)
if part == nil
# End of file reached, wait for more data
+ ALL_MEASUREMENTS.each{|m| report(m, 0)}
sleep TAIL_SLEEP_SEC
+ #TODO stat file to see if inode changed
else
lines += part
end

0 comments on commit bd36e36

Please sign in to comment.