Hello!

I'm working on a program at work for a device we are building, it's a device that (basically) in real-time reads in sensors, makes decisions about said data, and performs output. I have a loop that runs, and then calculates how long to sleep, so we can get as close as we can as possible to looping approx every second. It sends data over the internet to our servers where we have a web interface, and the ability to send commands back to the unit. It also runs a node server on the unit with a similar web interface.

The unit runs on a beaglebone black rev b6, which runs Debian 7 wheezy. I'm basically done programming all the features but I am noticing that the CPU Load average (as according to top) will run very high at times, escpecially when you access the node interface, but even when it's just chuggin along.

I incorporated cProfile to run an analysis on what is using CPU the most, and see if I can improve it's performance. I don't really understand all of what I am looking at here. How do I determine what needs to be improved? Where is the most CPU usage coming from in this cProfile output?

Any help would be appreciated. I've read a lot about cProfile, but it's just not clicking. Thanks

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.000    0.000 {zip}
       13    0.002    0.000    0.002    0.000 {method '__contains__' of 'frozenset' objects}
     3240    0.014    0.000    0.014    0.000 {method 'readline' of 'cStringIO.StringO' objects}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_sha1}
     3420    0.157    0.000    0.157    0.000 {method 'split' of 'str' objects}
        1    0.059    0.059    0.059    0.059 {wind.init_wind}
       24    0.002    0.000    0.002    0.000 {time.mktime}
     8866    0.052    0.000    0.052    0.000 {bin}
      405    2.176    0.005    2.176    0.005 {method 'splitlines' of 'str' objects}
     8866    0.335    0.000    0.335    0.000 {round}
        1    0.000    0.000    0.002    0.002 {method 'decode' of 'str' objects}
        8    0.001    0.000    0.001    0.000 {built-in method __new__ of type object at 0x1dba68}
     1615    0.055    0.000    0.055    0.000 {_struct.pack}
     1612    0.127    0.000    0.127    0.000 {fcntl.ioctl}
     1635    0.019    0.000    0.019    0.000 {method 'pop' of 'list' objects}
      403   43.103    0.107   43.103    0.107 {wind.speed}
        1    0.000    0.000    0.000    0.000 {method 'sort' of 'list' objects}
       40    0.001    0.000    0.001    0.000 {_sre.compile}
        1    0.000    0.000    0.000    0.000 {Adafruit_BBIO.UART.setup}
     1620    1.572    0.001    1.572    0.001 {method 'recv' of '_socket.socket' objects}
     1525    0.014    0.000    0.014    0.000 {method 'lower' of 'str' objects}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_sha224}
        1    0.002    0.002    0.002    0.002 {posix.fork}
        2    0.000    0.000    0.000    0.000 {method 'acquire' of 'thread.lock' objects}
     3242    0.018    0.000    0.018    0.000 {posix.getpid}
        3    0.000    0.000    0.000    0.000 {method 'setter' of 'property' objects}
     1613    0.140    0.000    0.140    0.000 {termios.tcsetattr}
     1414    0.021    0.000    0.021    0.000 {chr}
        8    0.000    0.000    0.000    0.000 {method '__subclasses__' of 'type' objects}
        1    0.000    0.000    0.000    0.000 {function seed at 0x4a2a70}
     1615    0.075    0.000    0.075    0.000 {posix.close}
        1    0.000    0.000    0.000    0.000 {_ctypes.set_conversion_mode}
      808    0.091    0.000    0.091    0.000 {repr}
        1    0.000    0.000    0.000    0.000 {method 'strftime' of 'datetime.date' objects}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_sha512}
      632    0.008    0.000    0.008    0.000 {method 'read' of 'cStringIO.StringI' objects}
     1620    2.165    0.001    2.165    0.001 {method 'sendall' of '_socket.socket' objects}
      127    0.003    0.000    0.003    0.000 {method 'rfind' of 'str' objects}
      247    0.002    0.000    0.002    0.000 {method 'format' of 'str' objects}
     6480    0.032    0.000    0.032    0.000 {method 'seek' of 'cStringIO.StringO' objects}
       25    0.000    0.000    0.000    0.000 {_struct.calcsize}
        1    0.000    0.000    0.000    0.000 {posix.urandom}
     1209    0.002    0.000    0.002    0.000 {id}
       86    0.000    0.000    0.000    0.000 {method 'isalnum' of 'str' objects}
       14    0.000    0.000    0.000    0.000 {globals}
       16    0.000    0.000    0.000    0.000 {built-in method fromkeys}
        1    0.004    0.004    0.004    0.004 {method 'connect' of '_socket.socket' objects}
       16    0.000    0.000    0.000    0.000 {method 'strip' of 'str' objects}
       42    0.000    0.000    0.000    0.000 {method 'group' of '_sre.SRE_Match' objects}
        1    0.000    0.000    0.000    0.000 {math.exp}
        1    0.000    0.000    0.000    0.000 {posix.WIFSIGNALED}
        8    0.000    0.000    0.000    0.000 {method '__subclasshook__' of 'object' objects}
     1612   29.368    0.018   29.368    0.018 {posix.write}
        1    0.000    0.000    0.000    0.000 {method 'insert' of 'list' objects}
        2    0.000    0.000    0.000    0.000 {_ctypes.POINTER}
       28    0.000    0.000    0.000    0.000 {max}
       13    0.000    0.000    0.001    0.000 {all}
       51    0.003    0.000    0.003    0.000 {method 'items' of 'dict' objects}
     1613    0.161    0.000    0.161    0.000 {termios.tcgetattr}
       13    0.000    0.000    0.000    0.000 {method 'isdigit' of 'str' objects}
        1    0.000    0.000    0.000    0.000 {posix.fdopen}
        5    0.000    0.000    0.000    0.000 {thread.allocate_lock}
     1620    0.013    0.000    0.013    0.000 {method 'write' of 'cStringIO.StringO' objects}
        1    0.000    0.000    0.000    0.000 {math.sqrt}
      517    0.060    0.000    0.060    0.000 {posix.stat}
     9723    0.073    0.000    0.078    0.000 {hasattr}
     1613    0.076    0.000    0.076    0.000 {posix.read}
        1    0.000    0.000    0.000    0.000 {posix.waitpid}
        1    0.000    0.000    0.000    0.000 {gc.disable}
        1    0.000    0.000    0.000    0.000 {method 'translate' of 'str' objects}
        2    0.000    0.000    0.000    0.000 {posix.pipe}
        1    0.002    0.002    0.002    0.002 {_socket.getaddrinfo}
       45    0.000    0.000    0.000    0.000 {method 'rstrip' of 'str' objects}
     1628    0.014    0.000    0.014    0.000 {method 'remove' of 'set' objects}
     6283    0.039    0.000    0.039    0.000 {method 'endswith' of 'str' objects}
      425    0.038    0.000    0.038    0.000 {method 'close' of 'file' objects}
      806    0.015    0.000    0.015    0.000 {method 'end' of '_sre.SRE_Match' objects}
      403    1.652    0.004    1.652    0.004 {method 'writelines' of 'file' objects}
    28522    0.246    0.000    0.246    0.000 {isinstance}
     1612    0.181    0.000    0.181    0.000 {method 'write' of 'file' objects}
       34    0.000    0.000    0.000    0.000 {_ctypes.sizeof}
        6    0.000    0.000    0.000    0.000 {method 'pop' of 'dict' objects}
     1655    0.012    0.000    0.012    0.000 {method 'add' of 'set' objects}
    28/17    0.000    0.000    0.006    0.000 {issubclass}
        2    0.000    0.000    0.000    0.000 {math.log}
        8    0.000    0.000    0.000    0.000 {fcntl.fcntl}
        1    0.000    0.000    0.000    0.000 {binascii.a2b_hex}
      509    0.014    0.000    0.014    0.000 {method 'startswith' of 'str' objects}
     8866    0.069    0.000    0.069    0.000 {method 'rjust' of 'str' objects}
    67704    0.550    0.000    0.550    0.000 {method 'zfill' of 'str' objects}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_sha256}
     1612    0.077    0.000    0.077    0.000 {select.select}
       17    0.000    0.000    0.000    0.000 {imp.acquire_lock}
     1244    0.707    0.001    0.707    0.001 {method 'read' of 'file' objects}
        2    0.000    0.000    0.000    0.000 {sys._getframe}
        4    0.000    0.000    0.000    0.000 {method 'append' of 'bytearray' objects}
     1612    0.021    0.000    0.021    0.000 {method 'extend' of 'bytearray' objects}
        1    0.000    0.000    0.000    0.000 {posix.sysconf}
     1023    0.005    0.000    0.005    0.000 {method 'replace' of 'str' objects}
    95451    0.156    0.000    0.156    0.000 {ord}
        2    0.000    0.000    0.000    0.000 {thread.get_ident}
        4    0.012    0.003    0.012    0.003 {Adafruit_BBIO.GPIO.setup}
       17    0.000    0.000    0.000    0.000 {imp.release_lock}
      142    0.000    0.000    0.000    0.000 {method 'setdefault' of 'dict' objects}
        2    0.008    0.004    0.008    0.004 {imp.load_dynamic}
       24    0.001    0.000    0.001    0.000 {method 'seek' of 'file' objects}
       24    0.003    0.000    0.003    0.000 {posix.access}
       64    0.000    0.000    0.000    0.000 {_sre.getlower}
        1    0.000    0.000    0.000    0.000 {binascii.hexlify}
      404   11.793    0.029   11.793    0.029 {posix.system}
        1    0.000    0.000    0.000    0.000 {posix.WEXITSTATUS}
        1    0.000    0.000    0.000    0.000 {gc.isenabled}
     6613    0.046    0.000    0.046    0.000 {getattr}
        1    0.000    0.000    0.000    0.000 {gc.enable}
       62    0.002    0.000    0.002    0.000 {posix.lstat}
        1    0.000    0.000    0.000    0.000 {method 'release' of 'thread.lock' objects}
        1    0.000    0.000    0.000    0.000 {method 'setsockopt' of '_socket.socket' objects}
     1613    0.304    0.000    0.304    0.000 {posix.open}
31958/31805    0.091    0.000    0.092    0.000 {len}
    10770    0.129    0.000    0.129    0.000 {range}
        1    0.000    0.000    0.000    0.000 {posix.getcwd}
        1    0.001    0.001    0.002    0.002 {__import__}
        1    0.000    0.000    0.000    0.000 {method 'copy' of 'dict' objects}
    95108    0.224    0.000    0.224    0.000 {hex}
     7836    0.499    0.000    1.601    0.000 {method 'join' of 'str' objects}
     1611    0.009    0.000    0.009    0.000 {time.time}
     2841    2.899    0.001    2.899    0.001 {open}
        4    0.000    0.000    0.096    0.024 {map}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_md5}
      410    0.256    0.001    0.256    0.001 {Adafruit_BBIO.GPIO.output}
        6    0.000    0.000    0.000    0.000 {method 'tell' of 'file' objects}
      964    0.028    0.000    0.028    0.000 {method 'match' of '_sre.SRE_Pattern' objects}
       18    0.000    0.000    0.001    0.000 {method 'extend' of 'list' objects}
     1620    0.008    0.000    0.008    0.000 {method 'truncate' of 'cStringIO.StringO' objects}
        2    0.000    0.000    0.000    0.000 {method 'settimeout' of '_socket.socket' objects}
       28    0.000    0.000    0.000    0.000 {setattr}
       20    0.018    0.001    0.018    0.001 {posix.listdir}
       14    0.048    0.003    0.048    0.003 {method 'get_data' of 'zipimport.zipimporter' objects}
        5    0.000    0.000    0.000    0.000 {method 'count' of 'list' objects}
        1    0.000    0.000    0.000    0.000 {_hashlib.openssl_sha384}
        7    0.000    0.000    0.000    0.000 {cStringIO.StringIO}
        3    0.001    0.000    0.001    0.000 {_ctypes.dlopen}
     2013  281.593    0.140  281.593    0.140 {time.sleep}
     1423    0.011    0.000    0.011    0.000 {method 'get' of 'dict' objects}
       77    0.004    0.000    0.004    0.000 {method 'remove' of 'list' objects}
        2    0.000    0.000    0.000    0.000 {method 'clear' of 'dict' objects}
        2    0.019    0.009    0.019    0.009 {method 'search' of '_sre.SRE_Pattern' objects}
      590    0.003    0.000    0.003    0.000 {min}
        2    0.010    0.005    0.010    0.005 {posix.popen}
       74    0.002    0.000    0.002    0.000 {method 'sub' of '_sre.SRE_Pattern' objects}
       26    0.000    0.000    0.000    0.000 {method 'update' of 'dict' objects}
     1783    0.026    0.000    0.026    0.000 {_struct.unpack}
      170    0.004    0.000    0.004    0.000 {method 'find' of 'str' objects}
        1    0.000    0.000    0.000    0.000 {posix.WIFEXITED}
        2    0.000    0.000    0.000    0.000 {built-in method now}
    20125    0.075    0.000    0.075    0.000 {method 'append' of 'list' objects}
        3    0.001    0.000    0.001    0.000 {dir}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
        3    0.001    0.000    0.001    0.000 {posix.uname}
       17    0.000    0.000    0.000    0.000 {method 'index' of 'list' objects}
        1    0.000    0.000    0.075    0.075 GPIO.py:1(<module>)
        1    0.000    0.000    0.075    0.075 GPIO.py:1(__bootstrap__)
        1    0.007    0.007    0.042    0.042 connection.py:1(<module>)
        1    0.000    0.000    0.749    0.749 UART.py:1(<module>)
        1    0.002    0.002    0.003    0.003 contextlib.py:1(<module>)
        1    0.000    0.000    0.000    0.000 <string>:1(SplitResult)
        1    0.005    0.005    0.177    0.177 lock.py:1(<module>)
        1    0.000    0.000    0.000    0.000 <string>:1(ParseResult)
        1    0.015    0.015    0.749    0.749 UART.py:1(__bootstrap__)
        1    0.002    0.002    0.005    0.005 utils.py:1(<module>)
        1    0.027    0.027    0.414    0.414 client.py:1(<module>)
        1    0.004    0.004    0.005    0.005 exceptions.py:1(<module>)
        1    0.000    0.000    0.000    0.000 <string>:1(<module>)
        1    0.005    0.005    0.010    0.010 collections.py:1(<module>)
        2    0.018    0.009    0.432    0.216 __init__.py:1(<module>)
        1    0.006    0.006    0.010    0.010 threading.py:1(<module>)
        1    0.014    0.014    0.148    0.148 _compat.py:1(<module>)
        1    0.000    0.000    0.000    0.000 bisect.py:1(<module>)
        1    0.021    0.021    0.021    0.021 Queue.py:1(<module>)
        1    0.001    0.001    0.020    0.020 encoder.py:2(<module>)
        1    0.001    0.001    0.041    0.041 decoder.py:2(<module>)
        1    0.004    0.004    0.027    0.027 scanner.py:2(<module>)
        1    0.001    0.001    0.003    0.003 symbol.py:3(<module>)
        1    0.008    0.008    0.008    0.008 base64.py:3(<module>)
        1    0.007    0.007    0.077    0.077 zipfile.py:3(<module>)
        1    0.000    0.000    0.000    0.000 token.py:3(<module>)
        1    0.026    0.026    0.033    0.033 __init__.py:4(<module>)
        1    0.027    0.027  406.865  406.865 main.py:4(<module>)
        1    0.001    0.001    0.001    0.001 _endian.py:4(<module>)
        1    0.004    0.004    0.022    0.022 util.py:4(<module>)
        1    0.000    0.000    0.000    0.000 cProfile.py:5(<module>)
        1    0.000    0.000    0.000    0.000 exceptions.py:5(RedisError)
        1    0.013    0.013    0.023    0.023 shutil.py:5(<module>)
        1    0.001    0.001    0.001    0.001 hex_codec.py:8(<module>)
        2    0.004    0.002    0.020    0.010 __init__.py:9(<module>)
        1    0.000    0.000    0.000    0.000 contextlib.py:9(GeneratorContextManager)
        1    0.000    0.000    0.000    0.000 lock.py:9(Lock)
        1    0.001    0.001    0.003    0.003 serialutil.py:9(<module>)
        1    0.000    0.000    0.145    0.145 platform.py:10(<module>)
        1    0.000    0.000    0.000    0.000 fnmatch.py:11(<module>)
        1    0.000    0.000    0.000    0.000 keyword.py:11(<module>)
        1    0.000    0.000    0.000    0.000 Queue.py:13(Empty)
        1    0.000    0.000    0.000    0.000 copy_reg.py:14(pickle)
      413    0.024    0.000    0.077    0.000 genericpath.py:15(exists)
        1    0.045    0.045    0.655    0.655 pkg_resources.py:15(<module>)
        1    0.012    0.012    0.016    0.016 serialposix.py:15(<module>)
        8    0.000    0.000    0.000    0.000 _weakrefset.py:16(__init__)
        2    0.000    0.000    0.000    0.000 functools.py:17(update_wrapper)
        1    0.000    0.000    0.000    0.000 Queue.py:17(Full)
        1    0.000    0.000    0.002    0.002 decoder.py:17(_floatconstants)
       24    0.000    0.000    0.001    0.000 UserDict.py:18(__getitem__)
        1    0.004    0.004    0.018    0.018 tempfile.py:18(<module>)
        1    0.000    0.000    0.000    0.000 zipfile.py:19(BadZipfile)
        1    0.000    0.000    0.000    0.000 exceptions.py:19(AuthenticationError)
        8    0.000    0.000    0.000    0.000 _weakrefset.py:20(__enter__)
        1    0.000    0.000    0.000    0.000 main.py:20(control)
        1    0.000    0.000    0.000    0.000 Queue.py:21(Queue)
        1    2.716    2.716  405.462  405.462 main.py:23(__init__)
        1    0.016    0.016    0.113    0.113 urllib.py:23(<module>)
        1    0.000    0.000    0.000    0.000 exceptions.py:23(ConnectionError)
        1    0.000    0.000    0.000    0.000 zipfile.py:23(LargeZipFile)
      146    0.008    0.000    0.008    0.000 sre_compile.py:24(_identityfunction)
      140    0.000    0.000    0.000    0.000 stat.py:24(S_IFMT)
        1    0.000    0.000    0.000    0.000 collections.py:25(OrderedDict)
        1    0.006    0.006    0.021    0.021 pickle.py:25(<module>)
        8    0.000    0.000    0.004    0.001 _weakrefset.py:26(__exit__)
        1    0.000    0.000    0.026    0.026 main.py:26(<lambda>)
        1    0.000    0.000    0.000    0.000 _endian.py:26(_swapped_meta)
       12    0.000    0.000    0.001    0.000 genericpath.py:26(isfile)
        1    0.000    0.000    0.000    0.000 copy_reg.py:27(constructor)
        1    0.000    0.000    0.000    0.000 exceptions.py:27(TimeoutError)
        1    0.000    0.000    0.025    0.025 version.py:27(<module>)
        1    0.000    0.000    0.000    0.000 hex_codec.py:27(hex_decode)
        1    0.003    0.003    0.038    0.038 urlparse.py:29(<module>)
        1    0.000    0.000    0.000    0.000 utils.py:29(dummy)
        1    0.004    0.004    0.004    0.004 heapq.py:31(<module>)
        1    0.000    0.000    0.000    0.000 exceptions.py:31(BusyLoadingError)
        1    0.000    0.000    0.000    0.000 shutil.py:31(Error)
        1    0.000    0.000    0.000    0.000 version.py:32(Version)
        8    0.000    0.000    0.000    0.000 _compat.py:32(nativestr)
   281/40    0.059    0.000    0.115    0.003 sre_compile.py:32(_compile)
        1    0.006    0.006    0.018    0.018 io.py:34(<module>)
        1    0.000    0.000    0.000    0.000 shutil.py:34(SpecialFileError)
        1    0.000    0.000    0.000    0.000 pprint.py:35(<module>)
        1    0.000    0.000    0.000    0.000 exceptions.py:35(InvalidResponse)
        1    0.000    0.000    0.001    0.001 os.py:35(_get_exports_list)
       28    0.001    0.000    0.001    0.000 _weakrefset.py:36(__init__)
     6915    0.023    0.000    0.023    0.000 _compat.py:37(b)
        1    0.000    0.000    0.000    0.000 shutil.py:38(ExecError)
       68    0.001    0.000    0.009    0.000 genericpath.py:38(isdir)
        1    0.000    0.000    0.000    0.000 exceptions.py:39(ResponseError)
        2    0.000    0.000    0.000    0.000 functools.py:39(wraps)
       68    0.001    0.000    0.001    0.000 stat.py:40(S_ISDIR)
        1    0.004    0.004    0.010    0.010 random.py:40(<module>)
     1620    0.007    0.000    0.007    0.000 _compat.py:41(byte_to_chr)
        1    0.000    0.000    0.000    0.000 exceptions.py:43(DataError)
        1    0.067    0.067    0.068    0.068 socket.py:45(<module>)
        1    0.000    0.000    0.000    0.000 hex_codec.py:45(Codec)
        1    0.000    0.000    0.003    0.003 warnings.py:45(filterwarnings)
        1    0.009    0.009    0.171    0.171 uuid.py:45(<module>)
        1    0.000    0.000    0.000    0.000 exceptions.py:47(PubSubError)
        1    0.007    0.007    0.007    0.007 __future__.py:48(<module>)
        1    0.000    0.000    0.000    0.000 __init__.py:49(normalize_encoding)
        1    0.000    0.000    0.000    0.000 _endian.py:49(BigEndianStructure)
       12    0.000    0.000    0.000    0.000 stat.py:49(S_ISREG)
       14    0.000    0.000    0.000    0.000 posixpath.py:51(normcase)
        4    0.000    0.000    0.000    0.000 serialutil.py:51(to_bytes)
        1    0.000    0.000    0.000    0.000 exceptions.py:51(WatchError)
        8    0.000    0.000    0.000    0.000 _weakrefset.py:52(_commit_removals)
        1    0.000    0.000    0.000    0.000 hex_codec.py:52(IncrementalEncoder)
        1    0.000    0.000    0.000    0.000 uuid.py:53(UUID)
        2    0.000    0.000    0.000    0.000 contextlib.py:54(contextmanager)
        1    0.000    0.000    0.000    0.000 exceptions.py:55(NoScriptError)
       60    0.000    0.000    0.001    0.000 stat.py:55(S_ISLNK)
        1    0.005    0.005    0.005    0.005 hashlib.py:55(<module>)
       12    0.000    0.000    0.001    0.000 client.py:56(string_keys_to_dict)
        1    0.000    0.000    0.000    0.000 threading.py:56(_Verbose)
        1    0.001    0.001    0.001    0.001 ssl.py:56(<module>)
        1    0.000    0.000    0.000    0.000 hex_codec.py:57(IncrementalDecoder)
        4    0.000    0.000    0.000    0.000 threading.py:58(__init__)
        1    0.000    0.000    0.000    0.000 pickle.py:58(PickleError)
       19    0.000    0.000    0.005    0.000 _weakrefset.py:58(__iter__)
       28    0.005    0.000    0.007    0.000 posixpath.py:59(isabs)
        1    0.000    0.000    0.000    0.000 exceptions.py:59(ExecAbortError)
        2    0.000    0.000    0.000    0.000 client.py:60(dict_merge)
        1    0.000    0.000    0.000    0.000 hex_codec.py:62(StreamWriter)
        1    0.000    0.000    0.000    0.000 pickle.py:62(PicklingError)
        1    0.001    0.001    0.017    0.017 version.py:63(StrictVersion)
        1    0.000    0.000    0.000    0.000 connection.py:63(Token)
        1    0.000    0.000    0.000    0.000 threading.py:63(_note)
        1    0.000    0.000    0.000    0.000 exceptions.py:63(ReadOnlyError)
        1    0.000    0.000    0.000    0.000 hex_codec.py:65(StreamReader)
        1    0.000    0.000    0.000    0.000 cProfile.py:66(Profile)
        1    0.000    0.000    0.000    0.000 exceptions.py:67(LockError)
       40    0.000    0.000    0.000    0.000 sre_parse.py:67(__init__)
        9    0.000    0.000    0.000    0.000 _weakrefset.py:68(__contains__)
      147    0.005    0.000    0.013    0.000 posixpath.py:68(join)
        1    0.000    0.000    0.000    0.000 pickle.py:69(UnpicklingError)
     1620    0.040    0.000    0.066    0.000 connection.py:69(__init__)
        1    0.000    0.000    0.000    0.000 io.py:69(IOBase)
        1    0.000    0.000    0.000    0.000 encoder.py:70(JSONEncoder)
       12    0.000    0.000    0.000    0.000 UserDict.py:70(__contains__)
        1    0.000    0.000    0.000    0.000 hex_codec.py:70(getregentry)
        1    0.000    0.000    0.000    0.000 urlparse.py:71(ResultMixin)
        1    0.000    0.000    0.002    0.002 __init__.py:71(search_function)
        1    0.000    0.000    0.000    0.000 io.py:72(RawIOBase)
        1    0.000    0.000    0.000    0.000 random.py:72(Random)
       77    0.003    0.000    0.004    0.000 sre_parse.py:72(opengroup)
        1    0.000    0.000    0.000    0.000 __future__.py:74(_Feature)
        1    0.000    0.000    0.000    0.000 io.py:75(BufferedIOBase)
        7    0.000    0.000    0.000    0.000 __future__.py:75(__init__)
        1    0.000    0.000    0.000    0.000 codecs.py:77(__new__)
        1    0.000    0.000    0.000    0.000 io.py:78(TextIOBase)
        3    0.003    0.001    0.003    0.001 __init__.py:78(CFUNCTYPE)
        1    0.000    0.000    0.000    0.000 serialutil.py:79(SerialException)
       12    0.000    0.000    0.004    0.000 pkg_resources.py:80(_bypass_ensure_directory)
        1    0.000    0.000    0.000    0.000 pprint.py:81(PrettyPrinter)
       16    0.000    0.000    0.000    0.000 _weakrefset.py:81(add)
        1    0.000    0.000    0.000    0.000 connection.py:81(BaseParser)
        1    0.000    0.000    0.000    0.000 pickle.py:82(_Stop)
       77    0.001    0.000    0.005    0.000 sre_parse.py:83(closegroup)
        1    0.000    0.000    0.000    0.000 serialutil.py:83(SerialTimeoutException)
       40    0.002    0.000    0.004    0.000 genericpath.py:85(_splitext)
        7    0.006    0.001    0.008    0.001 abc.py:86(__new__)
        7    0.000    0.000    0.000    0.000 abc.py:89(<genexpr>)
       14    0.000    0.000    0.001    0.000 posixpath.py:89(split)
      281    0.002    0.000    0.002    0.000 sre_parse.py:90(__init__)
        1    0.002    0.002    0.002    0.002 serialutil.py:91(FileLike)
        1    0.000    0.000    0.000    0.000 random.py:91(__init__)
        4    0.000    0.000    0.000    0.000 pkg_resources.py:92(_declare_state)
        6    0.000    0.000    0.000    0.000 hashlib.py:94(__get_openssl_constructor)
        1    0.006    0.006    0.066    0.066 __init__.py:99(<module>)
        1    0.000    0.000    0.000    0.000 connection.py:99(SocketBuffer)
        1    0.000    0.000    0.000    0.000 random.py:100(seed)
        1    0.000    0.000    0.000    0.000 connection.py:100(__init__)
        1    0.000    0.000    0.000    0.000 ssl.py:100(SSLSocket)
        4    0.000    0.000    0.000    0.000 uuid.py:101(__init__)
        1    0.000    0.000    0.000    0.000 encoder.py:101(__init__)
        1    0.000    0.000    0.000    0.000 threading.py:104(_RLock)
       40    0.000    0.000    0.005    0.000 posixpath.py:104(splitext)
        3    0.000    0.000    0.000    0.000 __init__.py:104(CFunctionType)
        8    0.000    0.000    0.006    0.001 abc.py:105(register)
        1    0.000    0.000    0.000    0.000 tempfile.py:107(_RandomNameSequence)
        1    0.000    0.000    0.000    0.000 urllib.py:109(ContentTooShortError)
     1620    0.098    0.000    1.702    0.001 connection.py:113(_read_from_socket)
        1    0.000    0.000    0.000    0.000 urllib.py:115(URLopener)
        1    0.000    0.000    0.000    0.000 urlparse.py:118(SplitResult)
       14    0.000    0.000    0.000    0.000 posixpath.py:119(basename)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:125(get_supported_platform)
      570    0.003    0.000    0.004    0.000 sre_parse.py:126(__len__)
        1    0.000    0.000    0.000    0.000 urlparse.py:126(ParseResult)
       19    0.000    0.000    0.001    0.000 posixpath.py:127(dirname)
     1196    0.021    0.000    0.032    0.000 sre_parse.py:130(__getitem__)
        1    0.000    0.000    0.000    0.000 contextlib.py:132(closing)
      117    0.001    0.000    0.010    0.000 re.py:134(match)
      126    0.000    0.000    0.000    0.000 sre_parse.py:134(__setitem__)
      493    0.003    0.000    0.004    0.000 sre_parse.py:138(append)
        2    0.000    0.000    0.040    0.020 re.py:139(search)
       62    0.003    0.000    0.005    0.000 posixpath.py:139(islink)
  407/166    0.026    0.000    0.029    0.000 sre_parse.py:140(getwidth)
       74    0.003    0.000    0.014    0.000 re.py:144(sub)
       14    0.001    0.000    0.001    0.000 __init__.py:147(_check_size)
        8    0.001    0.000    0.006    0.001 abc.py:148(__subclasscheck__)
        6    0.000    0.000    0.000    0.000 zipfile.py:157(_EndRecData64)
     1620    0.146    0.000    1.955    0.001 connection.py:157(readline)
        1    0.000    0.000    0.000    0.000 __init__.py:159(py_object)
        1    0.000    0.000    0.000    0.000 socket.py:167(_closedsocket)
        1    0.000    0.000    0.000    0.000 __init__.py:168(c_short)
        1    0.004    0.004    0.004    0.004 pickle.py:171(Pickler)
        1    0.000    0.000    0.000    0.000 __init__.py:172(c_ushort)
       24    0.000    0.000    0.000    0.000 pkgutil.py:173(__init__)
      403    0.112    0.000    0.112    0.000 pickle.py:173(__init__)
     1620    0.030    0.000    0.043    0.000 connection.py:176(purge)
        1    0.000    0.000    0.000    0.000 __init__.py:176(c_long)
       40    0.001    0.000    0.001    0.000 sre_parse.py:178(__init__)
       97    0.003    0.000    0.031    0.000 sre_compile.py:178(_compile_charset)
        1    0.000    0.000    0.000    0.000 socket.py:179(_socketobject)
      806    0.137    0.000    1.532    0.002 encoder.py:179(encode)
        1    0.000    0.000    0.000    0.000 __init__.py:180(c_ulong)
        2    0.000    0.000    0.000    0.000 threading.py:181(Condition)
     1132    0.031    0.000    0.036    0.000 sre_parse.py:182(__next)
        1    0.000    0.000    0.000    0.000 threading.py:184(_Condition)
        1    0.000    0.000    0.000    0.000 socket.py:185(__init__)
        2    0.001    0.001    0.099    0.049 util.py:185(_findSoname_ldconfig)
      806    0.105    0.000    1.637    0.002 __init__.py:185(dumps)
        1    0.000    0.000    0.000    0.000 lock.py:186(LuaLock)
        2    0.000    0.000    0.000    0.000 threading.py:186(__init__)
       36    0.000    0.000    0.330    0.009 re.py:188(compile)
        1    0.000    0.000    0.000    0.000 connection.py:189(PythonParser)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:189(ResolutionError)
        1    0.000    0.000    0.000    0.000 connection.py:193(__init__)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:194(VersionConflict)
      711    0.007    0.000    0.014    0.000 sre_parse.py:195(match)
        6    0.005    0.001    0.006    0.001 zipfile.py:196(_EndRecData)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:197(DistributionNotFound)
        1    0.000    0.000    0.000    0.000 __init__.py:197(c_float)
        1    0.000    0.000    0.000    0.000 serialutil.py:199(SerialBase)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:200(UnknownExtra)
      917    0.007    0.000    0.035    0.000 sre_parse.py:201(get)
        1    0.000    0.000    0.000    0.000 __init__.py:201(c_double)
        2    0.000    0.000    0.000    0.000 re.py:204(escape)
        1    0.000    0.000    0.000    0.000 connection.py:204(on_connect)
      806    1.240    0.002    1.240    0.002 encoder.py:205(iterencode)
        1    0.000    0.000    0.000    0.000 __init__.py:205(c_longdouble)
       97    0.013    0.000    0.019    0.000 sre_compile.py:207(_optimize_charset)
       28    0.000    0.000    0.000    0.000 sre_parse.py:210(isident)
        3    0.000    0.000    0.000    0.000 pkg_resources.py:211(register_loader_type)
     1613    0.436    0.000    2.253    0.001 serialutil.py:212(__init__)
        1    0.000    0.000    0.000    0.000 Queue.py:212(PriorityQueue)
        1    0.000    0.000    0.000    0.000 __init__.py:215(c_longlong)
        6    0.000    0.000    0.000    0.000 sre_parse.py:216(isname)
        1    0.000    0.000    0.000    0.000 __init__.py:219(c_ulonglong)
        2    0.000    0.000    0.030    0.015 pkg_resources.py:220(get_provider)
      403    0.035    0.000    0.520    0.001 pickle.py:220(dump)
        2    0.000    0.000    0.099    0.049 util.py:223(find_library)
     1624    0.046    0.000    2.226    0.001 socket.py:223(meth)
     1620    0.150    0.000    2.128    0.001 connection.py:224(read_response)
       44    0.001    0.000    0.001    0.000 sre_parse.py:225(_class_escape)
        1    0.000    0.000    0.000    0.000 __init__.py:226(c_ubyte)
        1    0.000    0.000    0.000    0.000 threading.py:226(_is_owned)
      229    0.005    0.000    0.365    0.002 re.py:226(_compile)
      403    0.046    0.000    0.075    0.000 pickle.py:227(memoize)
        1    0.000    0.000    0.008    0.008 version.py:228(LooseVersion)
        1    0.000    0.000    0.000    0.000 Queue.py:231(LifoQueue)
        1    0.000    0.000    0.000    0.000 __init__.py:233(c_byte)
        1    0.000    0.000    0.000    0.000 socket.py:235(_fileobject)
        1    0.000    0.000    0.000    0.000 __init__.py:238(c_char)
        7    0.000    0.000    0.000    0.000 client.py:239(bool_ok)
        1    0.000    0.000    0.000    0.000 __init__.py:243(c_char_p)
      403    0.008    0.000    0.013    0.000 pickle.py:250(put)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:252(get_build_platform)
        1    0.000    0.000    0.000    0.000 zipfile.py:252(ZipInfo)
        1    0.000    0.000    0.000    0.000 __init__.py:255(c_void_p)
       89    0.001    0.000    0.004    0.000 sre_parse.py:257(_escape)
        6    0.006    0.001    0.006    0.001 sre_compile.py:258(_mk_bitmap)
       12    0.002    0.000    0.002    0.000 posixpath.py:258(expanduser)
        1    0.000    0.000    0.000    0.000 __init__.py:260(c_bool)
        1    0.000    0.000    0.000    0.000 serialposix.py:260(PosixSerial)
     1613    0.164    0.000    1.540    0.001 serialposix.py:265(open)
        1    0.001    0.001    0.004    0.004 __init__.py:265(_reset_cache)
      403    0.100    0.000    0.482    0.001 pickle.py:269(save)
        1    0.000    0.000    0.000    0.000 connection.py:271(HiredisParser)
        1    0.000    0.000    0.000    0.000 decoder.py:273(JSONDecoder)
        1    0.000    0.000    0.000    0.000 threading.py:277(notify)
      158    0.004    0.000    0.012    0.000 zipfile.py:277(__init__)
      403    0.016    0.000    0.461    0.001 __init__.py:281(loads)
        1    0.001    0.001    0.002    0.002 client.py:281(StrictRedis)
     1613    0.052    0.000    0.065    0.000 serialutil.py:285(setPort)
        2    0.015    0.008    0.020    0.010 collections.py:287(namedtuple)
        1    0.000    0.000    0.000    0.000 __init__.py:291(c_wchar_p)
        1    0.000    0.000    0.000    0.000 __init__.py:294(c_wchar)
     1613    0.664    0.000    1.072    0.001 serialposix.py:295(_reconfigurePort)
        1    0.000    0.000    0.000    0.000 threading.py:295(notifyAll)
   127/40    0.014    0.000    0.193    0.005 sre_parse.py:301(_parse_sub)
        1    0.000    0.000    0.000    0.000 decoder.py:303(__init__)
        1    0.000    0.000    0.000    0.000 threading.py:304(_Semaphore)
      403    0.009    0.000    0.010    0.000 client.py:308(<lambda>)
     1613    0.029    0.000    0.029    0.000 serialutil.py:311(setBaudrate)
      485    0.005    0.000    0.016    0.000 urlparse.py:320(<genexpr>)
       14    0.001    0.000    0.005    0.000 posixpath.py:321(normpath)
       99    0.001    0.000    0.001    0.000 collections.py:328(<genexpr>)
     1613    0.025    0.000    0.025    0.000 serialutil.py:329(setByteSize)
        1    0.000    0.000    0.000    0.000 __init__.py:332(CDLL)
      403    0.017    0.000    0.017    0.000 pickle.py:333(persistent_id)
        1    0.000    0.000    0.000    0.000 client.py:342(<lambda>)
     1613    0.017    0.000    0.017    0.000 serialutil.py:342(setParity)
        3    0.001    0.000    0.002    0.001 __init__.py:349(__init__)
       14    0.000    0.000    0.006    0.000 posixpath.py:350(abspath)
       13    0.000    0.000    0.000    0.000 collections.py:352(<genexpr>)
        1    0.000    0.000    0.000    0.000 threading.py:352(_BoundedSemaphore)
      126    0.008    0.000    0.012    0.000 sre_compile.py:354(_simple)
       13    0.000    0.000    0.000    0.000 collections.py:354(<genexpr>)
     1613    0.020    0.000    0.020    0.000 serialutil.py:355(setStopbits)
        3    0.000    0.000    0.000    0.000 __init__.py:359(_FuncPtr)
      403    0.055    0.000    0.445    0.001 decoder.py:360(decode)
       40    0.003    0.000    0.037    0.001 sre_compile.py:361(_compile_info)
      158    0.005    0.000    0.005    0.000 zipfile.py:362(_decodeFilename)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:362(IMetadataProvider)
        1    0.000    0.000    0.000    0.000 tempfile.py:364(_TemporaryFileWrapper)
       14    0.002    0.000    0.023    0.002 posixpath.py:364(realpath)
        1    0.000    0.000    0.000    0.000 threading.py:364(Event)
       30    0.003    0.000    0.003    0.000 pkgutil.py:366(get_importer)
        1    0.000    0.000    0.000    0.000 threading.py:367(_Event)
     1613    0.018    0.000    0.018    0.000 serialutil.py:368(setTimeout)
      158    0.001    0.000    0.001    0.000 zipfile.py:368(_decodeExtra)
      403    0.351    0.001    0.351    0.001 decoder.py:371(raw_decode)
        1    0.000    0.000    0.000    0.000 threading.py:371(__init__)
        4    0.000    0.000    0.005    0.001 __init__.py:375(__getattr__)
   144/43    0.090    0.001    0.182    0.004 sre_parse.py:379(_parse)
        4    0.005    0.001    0.005    0.001 __init__.py:382(__getitem__)
        1    0.000    0.000    0.000    0.000 connection.py:383(Connection)
        1    0.000    0.000    0.000    0.000 threading.py:385(set)
     1613    0.029    0.000    0.029    0.000 serialutil.py:386(setWriteTimeout)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:386(IResourceProvider)
        1    0.000    0.000    0.000    0.000 collections.py:386(Counter)
        1    0.000    0.000    0.000    0.000 connection.py:387(__init__)
        1    0.000    0.000    0.000    0.000 platform.py:388(_popen)
        1    0.000    0.000    0.000    0.000 __init__.py:388(PyDLL)
        1    0.008    0.008    0.032    0.032 subprocess.py:389(<module>)
        1    0.000    0.000    0.001    0.001 client.py:393(__init__)
        1    0.000    0.000    0.000    0.000 subprocess.py:402(CalledProcessError)
        1    0.000    0.000    0.015    0.015 zipfile.py:405(_ZipDecrypter)
     1613    0.016    0.000    0.016    0.000 serialutil.py:405(setXonXoff)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:414(WorkingSet)
     1612    0.086    0.000    0.161    0.000 serialposix.py:415(close)
     1613    0.018    0.000    0.018    0.000 serialutil.py:416(setRtsCts)
        1    0.000    0.000    0.127    0.127 pkg_resources.py:417(__init__)
        1    0.014    0.014    0.015    0.015 zipfile.py:418(_GenerateCRCTable)
        1    0.000    0.000    0.000    0.000 threading.py:424(Thread)
     1613    0.020    0.000    0.020    0.000 serialutil.py:427(setDsrDtr)
        1    0.000    0.000    0.000    0.000 __init__.py:428(LibraryLoader)
     1612    0.089    0.000    0.231    0.000 serialposix.py:428(inWaiting)
        2    0.000    0.000    0.000    0.000 __init__.py:429(__init__)
        1    0.000    0.000    0.009    0.009 connection.py:430(connect)
        1    0.000    0.000    0.127    0.127 pkg_resources.py:430(_build_master)
     1612    0.164    0.000    0.338    0.000 serialposix.py:435(read)
        1    0.000    0.000    0.000    0.000 threading.py:436(__init__)
     1613    0.022    0.000    0.022    0.000 serialutil.py:443(setInterCharTimeout)
        1    0.002    0.002    0.009    0.009 connection.py:453(_connect)
     1612    0.139    0.000   29.528    0.018 serialposix.py:460(write)
        1    0.000    0.000    0.000    0.000 subprocess.py:460(_cleanup)
        1    0.000    0.000    0.014    0.014 zipfile.py:464(ZipExtFile)
       30    0.002    0.000    0.223    0.007 pkg_resources.py:472(add_entry)
       80    0.001    0.000    0.001    0.000 sre_compile.py:474(isstring)
        3    0.000    0.000    0.028    0.009 subprocess.py:475(_eintr_retry_call)
      403    0.086    0.000    0.361    0.001 pickle.py:480(save_string)
       40    0.003    0.000    0.155    0.004 sre_compile.py:480(_code)
        3    0.000    0.000    0.001    0.000 __init__.py:493(PYFUNCTYPE)
        1    0.003    0.003    0.003    0.003 tempfile.py:493(SpooledTemporaryFile)
        3    0.000    0.000    0.000    0.000 __init__.py:494(CFunctionType)
       40    0.004    0.000    0.357    0.009 sre_compile.py:495(compile)
        1    0.000    0.000    0.000    0.000 connection.py:503(on_connect)
        1    0.000    0.000    0.039    0.039 subprocess.py:515(check_output)
       18    0.000    0.000    0.000    0.000 pkg_resources.py:530(__iter__)
     1620    0.096    0.000    2.336    0.001 connection.py:531(send_packed_command)
        1    0.000    0.000    0.000    0.000 threading.py:531(_set_ident)
       40    0.008    0.000    0.016    0.000 pkg_resources.py:547(add)
     1620    0.069    0.000    3.070    0.002 connection.py:556(send_command)
     1620    0.184    0.000    5.778    0.004 client.py:563(execute_command)
     1620    0.049    0.000    2.184    0.001 connection.py:569(read_response)
     1620    0.055    0.000    2.250    0.001 client.py:580(parse_response)
     3656    0.068    0.000    0.093    0.000 connection.py:580(encode)
        1    0.000    0.000    0.000    0.000 sysconfig.py:593(get_platform)
     1620    0.394    0.000    0.665    0.000 connection.py:596(pack_command)
        1    0.000    0.000    0.000    0.000 serialposix.py:599(Serial)
        1    0.000    0.000    0.000    0.000 serialposix.py:602(PosixPollSerial)
        1    0.000    0.000    0.000    0.000 urllib.py:609(FancyURLopener)
        1    0.003    0.003    0.003    0.003 subprocess.py:618(Popen)
        1    0.000    0.000    0.022    0.022 subprocess.py:619(__init__)
        1    0.000    0.000    0.000    0.000 connection.py:649(SSLConnection)
        1    0.000    0.000    0.000    0.000 random.py:651(WichmannHill)
        1    0.000    0.000    0.000    0.000 zipfile.py:654(ZipFile)
       40    0.002    0.000    0.197    0.005 sre_parse.py:663(parse)
        6    0.000    0.000    0.062    0.010 zipfile.py:671(__init__)
        1    0.000    0.000    0.011    0.011 client.py:677(ping)
        1    0.000    0.000    0.000    0.000 connection.py:688(UnixDomainSocketConnection)
        1    0.000    0.000    0.000    0.000 subprocess.py:709(__del__)
        1    0.000    0.000    0.018    0.018 subprocess.py:723(communicate)
        1    0.000    0.000    0.012    0.012 main.py:724(connect_redis)
        1    0.000    0.000    0.000    0.000 connection.py:731(ConnectionPool)
        1    0.000    0.000    0.023    0.023 pkg_resources.py:732(subscribe)
        1    0.000    0.000    0.000    0.000 threading.py:737(_Timer)
       17    0.000    0.000    0.000    0.000 pkg_resources.py:740(_added_new)
        6    0.000    0.000    0.061    0.010 zipfile.py:744(_GetContents)
      403    2.129    0.005    2.996    0.007 main.py:749(demand_shedding)
        6    0.017    0.003    0.061    0.010 zipfile.py:755(_RealGetContents)
        1    0.000    0.000    0.000    0.000 subprocess.py:757(poll)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:758(Environment)
        1    0.000    0.000    0.000    0.000 threading.py:766(_MainThread)
        1    0.000    0.000    0.001    0.001 threading.py:768(__init__)
        1    0.000    0.000    0.000    0.000 threading.py:775(_set_daemon)
        1    0.000    0.000    0.000    0.000 random.py:801(SystemRandom)
        1    0.000    0.000    0.000    0.000 threading.py:806(_DummyThread)
        6    0.004    0.001    0.005    0.001 zipfile.py:822(namelist)
        1    0.000    0.000    0.000    0.000 pickle.py:827(Unpickler)
        1    0.000    0.000    0.000    0.000 connection.py:841(__init__)
        1    0.000    0.000    0.000    0.000 urllib.py:850(ftpwrapper)
      158    0.001    0.000    0.005    0.000 zipfile.py:854(getinfo)
        1    0.000    0.000    0.000    0.000 connection.py:869(reset)
     3240    0.064    0.000    0.082    0.000 connection.py:876(_checkpid)
     1620    0.070    0.000    0.156    0.000 connection.py:886(get_connection)
        1    0.000    0.000    0.000    0.000 connection.py:896(make_connection)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:900(ExtractionError)
     1620    0.075    0.000    0.118    0.000 connection.py:903(release)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:916(ResourceManager)
        1    0.000    0.000    0.000    0.000 connection.py:919(BlockingConnectionPool)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:920(__init__)
        2    0.000    0.000    0.146    0.073 pkg_resources.py:933(resource_filename)
        1    0.000    0.000    0.000    0.000 urllib.py:945(addbase)
      403    0.075    0.000    3.214    0.008 main.py:971(SaveRevolvingSecondDataRedis)
        1    0.000    0.000    0.000    0.000 urllib.py:974(addclosehook)
       12    0.001    0.000    0.016    0.001 pkg_resources.py:984(get_cache_path)
        1    0.000    0.000    0.000    0.000 urllib.py:989(addinfo)
      403    2.595    0.006    2.688    0.007 main.py:992(file_len)
        1    0.000    0.000    0.000    0.000 urllib.py:999(addinfourl)
      403    3.978    0.010   12.848    0.032 main.py:1007(opportunity)
       12    0.000    0.000    0.001    0.000 pkg_resources.py:1009(_warn_unsafe_extraction_path)
        1    0.000    0.000    0.000    0.000 subprocess.py:1037(_get_handles)
     1612    0.871    0.001  164.949    0.102 main.py:1050(command)
    96720    0.723    0.000    1.102    0.000 main.py:1074(<genexpr>)
        4    0.000    0.000    0.000    0.000 subprocess.py:1082(_set_cloexec_flag)
       12    0.001    0.000    0.003    0.000 pkg_resources.py:1092(get_default_cache)
        2    0.000    0.000    0.000    0.000 subprocess.py:1095(pipe_cloexec)
     1612    0.493    0.000    0.711    0.000 main.py:1096(computeCRC)
     8866    0.981    0.000    1.481    0.000 main.py:1113(ieee_convert)
        1    0.008    0.008    0.021    0.021 subprocess.py:1121(_execute_child)
    55614    0.627    0.000    0.627    0.000 main.py:1131(inc)
       40    0.000    0.000    0.013    0.000 pkg_resources.py:1133(safe_name)
       34    0.004    0.000    0.006    0.000 pkg_resources.py:1141(safe_version)
      403    2.407    0.006  170.112    0.422 main.py:1145(get_meter_data)
        6    0.000    0.000    0.000    0.000 zipfile.py:1166(__del__)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1168(MarkerEvaluation)
       12    0.000    0.000    0.001    0.000 zipfile.py:1170(close)
      485    0.016    0.000    0.018    0.000 urllib.py:1199(<genexpr>)
     1209    0.032    0.000    4.767    0.004 client.py:1214(llen)
        7    0.000    0.000    0.058    0.008 client.py:1256(ltrim)
        1    0.000    0.000    0.000    0.000 pickle.py:1261(_EmptyClass)
        1    0.000    0.000    0.000    0.000 subprocess.py:1262(_handle_exitstatus)
        1    0.000    0.000    0.000    0.000 zipfile.py:1274(PyZipFile)
        2    0.000    0.000    0.000    0.000 subprocess.py:1276(_internal_poll)
      403    0.021    0.000    0.996    0.002 client.py:1277(rpush)
        1    0.000    0.000    0.000    0.000 subprocess.py:1296(wait)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1331(NullProvider)
        2    0.000    0.000    0.000    0.000 pkg_resources.py:1338(__init__)
       16    0.000    0.000    0.010    0.001 pkg_resources.py:1354(has_metadata)
        2    0.000    0.000    0.001    0.000 pkg_resources.py:1358(get_metadata)
        2    0.000    0.000    0.001    0.000 pkg_resources.py:1368(get_metadata_lines)
      403    0.202    0.001    0.835    0.002 pickle.py:1369(dump)
       30    0.001    0.000    0.003    0.000 pkg_resources.py:1418(_fn)
        2    0.000    0.000    0.001    0.000 pkg_resources.py:1423(_get)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1433(EggProvider)
        2    0.000    0.000    0.003    0.001 pkg_resources.py:1436(__init__)
        6    0.002    0.000    0.003    0.000 pkg_resources.py:1440(_setup_prefix)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1454(DefaultProvider)
        6    0.000    0.000    0.004    0.001 pkg_resources.py:1457(_has)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1482(EmptyProvider)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1490(__init__)
        6    0.002    0.000    0.076    0.013 pkg_resources.py:1496(build_zipmanifest)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1529(ZipProvider)
        2    0.000    0.000    0.030    0.015 pkg_resources.py:1534(__init__)
       22    0.000    0.000    0.001    0.000 pkg_resources.py:1539(_zipinfo_name)
       14    0.000    0.000    0.001    0.000 pkg_resources.py:1548(_parts)
        2    0.005    0.002    0.116    0.058 pkg_resources.py:1557(get_resource_filename)
       24    0.006    0.000    0.008    0.000 pkg_resources.py:1570(_get_date_and_size)
       12    0.001    0.000    0.105    0.009 pkg_resources.py:1578(_extract_resource)
       12    0.014    0.001    0.086    0.007 pkg_resources.py:1627(_is_current)
        2    0.000    0.000    0.004    0.002 pkg_resources.py:1644(_get_eager_resources)
       16    0.002    0.000    0.004    0.000 pkg_resources.py:1653(_index)
       10    0.000    0.000    0.004    0.000 pkg_resources.py:1670(_has)
       10    0.000    0.000    0.002    0.000 pkg_resources.py:1680(_eager_to_zip)
        2    0.000    0.000    0.000    0.000 pkg_resources.py:1683(_resource_to_zip)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1689(FileMetadata)
       20    0.000    0.000    0.000    0.000 pkg_resources.py:1701(__init__)
        9    0.000    0.000    0.000    0.000 pkg_resources.py:1704(has_metadata)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1719(PathMetadata)
       16    0.000    0.000    0.000    0.000 pkg_resources.py:1739(__init__)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:1744(EggMetadata)
        4    0.000    0.000    0.050    0.012 pkg_resources.py:1747(__init__)
        3    0.000    0.000    0.000    0.000 pkg_resources.py:1761(register_finder)
       30    0.001    0.000    0.011    0.000 pkg_resources.py:1771(find_distributions)
        8    0.000    0.000    0.057    0.007 pkg_resources.py:1777(find_eggs_in_zip)
        2    0.000    0.000    0.000    0.000 pkg_resources.py:1798(find_nothing)
       60    0.032    0.001    0.137    0.002 pkg_resources.py:1802(find_on_path)
        3    0.000    0.000    0.000    0.000 pkg_resources.py:1851(register_namespace_handler)
       17    0.000    0.000    0.000    0.000 pkg_resources.py:1927(fixup_namespace_packages)
        1    0.002    0.002    0.002    0.002 client.py:1957(Redis)
       14    0.000    0.000    0.024    0.002 pkg_resources.py:1962(normalize_path)
      270    0.001    0.000    0.025    0.000 pkg_resources.py:1966(_normalize_cached)
       12    0.000    0.000    0.000    0.000 pkg_resources.py:1981(yield_lines)
        1    0.000    0.000    0.000    0.000 client.py:2041(PubSub)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:2063(EntryPoint)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:2176(Distribution)
       40    0.002    0.000    0.021    0.001 pkg_resources.py:2180(__init__)
       40    0.003    0.000    0.030    0.001 pkg_resources.py:2192(from_location)
      108    0.006    0.000    0.007    0.000 pkg_resources.py:2240(key)
       17    0.000    0.000    0.008    0.000 pkg_resources.py:2303(_get_metadata)
       17    0.001    0.000    0.022    0.001 pkg_resources.py:2308(activate)
        1    0.000    0.000    0.000    0.000 client.py:2311(PubSubWorkerThread)
        1    0.000    0.000    0.000    0.000 client.py:2338(BasePipeline)
       57    0.001    0.000    0.001    0.000 pkg_resources.py:2341(__getattr__)
        8    0.002    0.000    0.016    0.002 pkg_resources.py:2347(from_filename)
       17    0.011    0.001    0.013    0.001 pkg_resources.py:2381(insert_on)
        1    0.000    0.000    0.009    0.009 pkg_resources.py:2464(DistInfoDistribution)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:2616(Requirement)
        1    0.000    0.000    0.000    0.000 client.py:2647(StrictPipeline)
        1    0.000    0.000    0.000    0.000 client.py:2652(Pipeline)
        1    0.000    0.000    0.000    0.000 client.py:2657(Script)
       32    0.006    0.000    0.007    0.000 pkg_resources.py:2685(_get_mro)
       24    0.000    0.000    0.000    0.000 pkg_resources.py:2688(cls)
       32    0.001    0.000    0.008    0.000 pkg_resources.py:2692(_find_adapter)
        1    0.000    0.000    0.000    0.000 pkg_resources.py:2742(_initialize)
       17    0.000    0.000    0.022    0.001 pkg_resources.py:2760(<lambda>)

On first glance look at the items with the highest tottime values. Then check the number of calls and the percall time. Remember that function calls are expensive because of the overhead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.