def parse_sched(line): m = pat_sched.search(line) if not m: return None return SchedData(time=m.group(1), cpu=m.group(2), prev=m.group(3), next=m.group(4))
def parse_htb(line): m = pat_htb.search(line) if not m: return None return HTBData(cpu=m.group(1), time=m.group(2), action=m.group(3), link=m.group(4), qlen=m.group(5))