Commit 9ddca5f9 authored by Rich Prohaska's avatar Rich Prohaska

#68 simplify tokustat output

parent 2dadbbe4
......@@ -7,9 +7,12 @@ import MySQLdb
def usage():
print "diff the tokudb engine status"
print "[--host=HOSTNAME] (default: localhost)"
print "[--port=PORT]"
print "[--sleeptime=SLEEPTIME] (default: 10 seconds)"
print "--host=HOSTNAME (default: localhost)"
print "--port=PORT"
print "--sleeptime=SLEEPTIME (default: 10 seconds)"
print "--q='show engine tokudb status'"
print "--q='select * from information_schema.global_status'"
return 1
def convert(v):
......@@ -38,9 +41,14 @@ def printit(stats, rs, sleeptime):
print k, "|", oldv, "|", v,
try:
d = v - oldv
if d == 0:
d = float(v - oldv)
print "|", d, "|", d / sleeptime
if sleeptime != 1:
if d >= sleeptime:
e = d / sleeptime
else:
e = float(d) / sleeptime
print "|", d, "|", e
else:
print "|", d
except:
print
stats[k] = v
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment