def main(argv): if len(argv) != 2: print('Usage: %s <dir>' % argv[0]) sys.exit(1) dir = argv[1] size = utils.obfsize('%s/obf-size.log' % dir) print('Size: %.2f MB' % round(size / 2 ** 20, 2))
def main(argv): if len(argv) != 2: print('Usage: %s <dir>' % argv[0]) sys.exit(1) dir = argv[1] size = utils.obfsize('%s/obf-size.log' % dir) print('Size: %.2f MB' % round(size / 2**20, 2))
def main(argv): if len(argv) != 2: print('Usage: %s <path>' % argv[0]) sys.exit(1) path = argv[1] _, size = utils.obfsize(path) print('Size (MB): %f' % round(size / 2**20, 5))
def main(argv): if len(argv) != 2: print('Usage: %s <path>' % argv[0]) sys.exit(1) path = argv[1] _, size = utils.obfsize(path) print('Size (MB): %f' % round(size / 2 ** 20, 5))
def main(argv): if len(argv) != 2: print('Usage: %s <dir>' % argv[0]) sys.exit(1) dir = argv[1] utils.obftime('%s/obf-time.log' % dir) size = utils.obfsize('%s/obf-size.log' % dir) print('Obf Size: %.2f MB' % round(size / 2**20, 2)) time, ram = utils.evaltime('%s/eval-time.log' % dir) print('Eval Time: %.2f s' % round(time, 2)) print('Eval RAM: %.2f MB' % round(ram / 1024, 2))
def obfsize(ax1): xs = (8, 12, 16) path8 = os.path.join('results', 'point.52', 'point-8.circ-52-obf-size.log') path12 = os.path.join('results', 'point.52', 'point-12.circ-52-obf-size.log') path16 = os.path.join('results', 'point.52', 'point-16.circ-52-obf-size.log') _, bar8 = utils.obfsize(path8) _, bar12 = utils.obfsize(path12) _, bar16 = utils.obfsize(path16) all = [bar8, bar12, bar16] all = [x / 2 ** 30 for x in all] print('obf size: %s' % all) ind = np.arange(len(all)) width = 0.4 total = ax1.bar(ind + width, all, width, color='gray') ax1.set_ylabel(r'Obfuscation size (GB)') ax1.set_xlabel(r'Input size of point function') ax1.set_xticks(ind + 0.6) ax1.set_xticklabels(xs)
def extract_obf_size(path): _, size = utils.obfsize(path) return size