def track_cpu_stats():
    pid = os.getpid()
    def append_stats():
        rawstats = subprocess.Popen([pid % 'ps -p %d -f'], shell=True, stdout=subprocess.PIPE).communicate()[0]
        header, data = rawstats.split('\n', 1)
        procstats = [d for d in data.split(' ') if d]
        cpustats.append(int(procstats[3]))
    while True:
        diesel.sleep(1)
        diesel.thread(append_stats)
dataset/ETHPy150Open dieseldev/diesel/examples/timer_bench.py/track_cpu_stats/swapped operands of `%`