def rd(): start = time.clock() wb = open_workbook(fname) end = time.clock() print("xlrd {:0.1f}s".format(end - start)) use = memory_usage(proc=-1, interval=1)[0] print("Memory use %.1f MB" % use) print_summary()
def pixel(): start = time.clock() wb = load_workbook(fname, keep_links=False) end = time.clock() print("openpyxl {:0.1f} s".format(end - start)) use = memory_usage(proc=-1, interval=1)[0] print("Memory use %.1f MB" % use) print_summary()
def monitoring(self): from pympler import muppy muppy.print_summary() self.tr.print_diff() print(f'Common count {len(self.connections)}') disconnected_cnt = 0 for conn in self.connections: if 'disconnected' in self.connections[conn]: disconnected_cnt += 1 print(f'Disconnected {disconnected_cnt}') reactor.callLater(60, self.monitoring)
from openpyxl import load_workbook, __version__ import time import cProfile from memory_profiler import memory_usage def main(): start = time.clock() wb = load_workbook("Issues/bug494.xlsx", keep_links=False) ws = wb.active print("openpyxl {0}".format(__version__)) print(time.clock() - start) if __name__ == '__main__': cProfile.run("main()", sort="tottime") from pympler.muppy import print_summary print_summary()