print("-" * 28)

    maxname = max([len(p) for p in analysistimes])

    print("\n\nProject statistics:")
    print("analysis date".ljust(16) + "  " + "project".ljust(maxname) +
          "LOC ".rjust(10) + "CLOC ".rjust(10) + "functions".rjust(10))
    print("-" * (maxname + 48))
    lctotal = 0
    clctotal = 0
    fctotal = 0
    for p in sorted(analysistimes, key=lambda p: analysistimes[p]):
        (lc, clc, fc) = projectstats[p]
        lctotal += lc
        clctotal += clc
        fctotal += fc
        print(
            time.strftime("%Y-%m-%d %H:%M", time.localtime(analysistimes[p])) +
            "  " + p.ljust(maxname) + str(lc).rjust(10) + str(clc).rjust(10) +
            str(fc).rjust(10))
    print("-" * (maxname + 48))
    print(("Total " + str(len(analysistimes)) +
           " test sets: ").ljust(maxname + 18) + str(lctotal).rjust(10) +
          str(clctotal).rjust(10) + str(fctotal).rjust(10))

    print("\n\nProof obligation transfer")

    print("\n".join(
        RP.totals_to_presentation_string(ppoprojecttotals, spoprojecttotals,
                                         projectstats)))
Exemple #2
0
            print('  ' + p)
            print('-' * 28)

    print('\n\nProject statistics:')
    print('analysis time'.ljust(16) + '  ' +  'project'.ljust(28)
              +  'LOC '.rjust(10) + 'CLOC '.rjust(10)
              + 'functions'.rjust(10))
    print('-' * 80)
    lctotal = 0
    clctotal = 0
    fctotal = 0
    for p in sorted(analysistimes,key=lambda p:analysistimes[p]):
        (lc,clc,fc) = projectstats[p]
        lctotal += lc
        clctotal += clc
        fctotal += fc
        print(time.strftime('%Y-%m-%d %H:%M',time.localtime(analysistimes[p]))
                  + '  ' + p.ljust(28) + str(lc).rjust(10) + str(clc).rjust(10)
                  + str(fc).rjust(10))
    print('-' * 80)
    print('Total'.ljust(46) + str(lctotal).rjust(10) + str(clctotal).rjust(10)
              + str(fctotal).rjust(10))

    print('\n\nProof obligation transfer')

    print('\n'.join(RP.totals_to_presentation_string(ppoprojecttotals,spoprojecttotals,projectstats)))