예제 #1
0
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()
예제 #2
0
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()
예제 #3
0
    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)
예제 #4
0
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()