Beispiel #1
0
def show_heatmap(args):
    client = DiffsClient(args.agent_url, args.verbose)
    
    start_time = strptime(args.start_time)
    end_time = strptime(args.end_time)
    bucketing = calculate_bucketing(args.width, start_time, end_time)
    diffs = client.get_diffs_zoomed(start_time, end_time, bucketing)

    swimlane_boundary = "-" * args.width
    print_time_axis(args.width, start_time, end_time)
    for pair_key, diffs in diffs.iteritems():
        print swimlane_boundary
        print format_y_label(pair_key) + "".join(shade(count) for count in diffs)
    print swimlane_boundary
Beispiel #2
0
def list_diffs(args):
    client = DiffsClient(args.agent_url, args.verbose)
    
    start_time = strptime(args.start_time)
    end_time = strptime(args.end_time)
    
    diffs = client.get_diffs(args.pair_key, start_time, end_time)
    for diff in diffs:
        data = (describe_match_state(diff),
                diff['objId']['id'],
                diff['upstreamVsn'],
                diff['downstreamVsn'],
                diff['detectedAt'])
        print " ".join(unicode(datum) or "-" for datum in data)