#!/usr/bin/env python # Copyright (c) 2014, NORDUnet A/S. # See LICENSE for licensing information. import argparse import sys import ast import itertools def parse_one_line(line): row = line.rstrip().split(":") assert row[0].startswith("mergeoutput.") iteration = int(row[0][12:]) stage = row[2].strip() data = ast.literal_eval(row[3].strip()) return (iteration, stage, data) def main(): parser = argparse.ArgumentParser(description="") parser.add_argument('inputfile', help="Input file") args = parser.parse_args() lines = [parse_one_line(line) for line in open(args.inputfile)] iterations = itertools.groupby(lines, lambda x: x[0]) print "" print "" print "
" print "" print "" print "" % (seconds, stagen * 90, itemn * step + 40, stage, item) if i == 0: legend.append("%s" % (stagen * 90, itemn * step + 40, item)) print " " print " | " if i == 0: legend.append("