Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

if we read nothing, report everything as 0

  • Loading branch information...
commit bd36e367a3e50503b544e48252b4805778a06629 1 parent dd83afb
@ryanking ryanking authored jkalucki committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/jvm-gc-stats.rb
View
4 bin/jvm-gc-stats.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.