WT-2916 Fix and simplify s_whitespace. (#3047)

This commit is contained in:
Michael Cahill
2016-09-16 16:16:17 +10:00
committed by Alex Gorrod
parent d318b8a537
commit 03bbd9d3c9
96 changed files with 46 additions and 170 deletions

View File

@@ -32,7 +32,6 @@
import os
from wiredtiger import wiredtiger_open,WIREDTIGER_VERSION_STRING,stat
def main():
# Create a clean test directory for this run of the test program
os.system('rm -rf WT_HOME')
@@ -58,19 +57,16 @@ def main():
print_derived_stats(session)
conn.close()
def print_database_stats(session):
statcursor = session.open_cursor("statistics:")
print_cursor(statcursor)
statcursor.close()
def print_file_stats(session):
fstatcursor = session.open_cursor("statistics:table:access")
print_cursor(fstatcursor)
fstatcursor.close()
def print_overflow_pages(session):
ostatcursor = session.open_cursor("statistics:table:access")
val = ostatcursor[stat.dsrc.btree_overflow]
@@ -78,7 +74,6 @@ def print_overflow_pages(session):
print '%s=%s' % (str(val[0]), str(val[1]))
ostatcursor.close()
def print_derived_stats(session):
dstatcursor = session.open_cursor("statistics:table:access")
ckpt_size = dstatcursor[stat.dsrc.block_checkpoint_size][1]
@@ -97,7 +92,6 @@ def print_derived_stats(session):
print "Write amplification is " + '{:.2f}'.format(fs_writes / (app_insert + app_remove + app_update))
dstatcursor.close()
def print_cursor(mycursor):
while mycursor.next() == 0:
val = mycursor.get_value()
@@ -106,4 +100,3 @@ def print_cursor(mycursor):
if __name__ == "__main__":
main()