Пример #1
0
def obftime(ax1):
    xs = (8, 12, 16)

    path8 = os.path.join('results', 'point.52', 'point-8.circ-52-obf-time.log')
    path12 = os.path.join('results', 'point.52', 'point-12.circ-52-obf-time.log')
    path16 = os.path.join('results', 'point.52', 'point-16.circ-52-obf-time.log')

    bar8 = utils.extract_obf_time(path8)
    bar12 = utils.extract_obf_time(path12)
    bar16 = utils.extract_obf_time(path16)

    all = zip(bar8, bar12, bar16)
    all = [(a / 60 / 60, b / 60 / 60, c / 60 / 60) for a, b, c in all]

    ind = np.arange(len(all[0]))
    width = 0.4

    encodingtime = map(add, all[6], all[7])

    total = ax1.bar(ind + width, all[8], width, color='white')
    mlm = ax1.bar(ind + width, all[4], width, color='black')
    enc = ax1.bar(ind + width, encodingtime, width, color='gray', bottom=all[4])

    ax1.set_ylabel(r'Obfuscation time (hr)')
    ax1.set_xlabel(r'Input size of point function')
    ax1.set_xticks(ind + 0.6)
    ax1.set_ylim(0, 10)
    ax1.set_xticklabels(xs)

    ax1.legend((mlm[0], enc[0]),
               ('Param gen', 'Encoding'),
               loc='upper left')
Пример #2
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <path>' % argv[0])
        sys.exit(1)

    path = argv[1]

    _ = utils.extract_obf_time(path)
Пример #3
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <path>' % argv[0])
        sys.exit(1)

    path = argv[1]

    _ = utils.extract_obf_time(path)