Skip to content

Commit

Permalink
marvin-ciphertext-generator: more granular progress
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed Dec 8, 2023
1 parent dfe0344 commit f876258
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions scripts/marvin-ciphertext-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,40 @@ def main():
ciphertexts = marvin_gen.generate()
print("Test passed.")

print("Generating ciphertexts...")

with open(
os.path.join(outdir, 'pms_values.bin'),
"wb"
) as pms_file:
# create a real order of tests to run
log = Log(os.path.join(outdir, "log.csv"))
print("Generating log...")

status = [0, repetitions, Event()]
kwargs = dict()
kwargs['delay'] = status_delay
kwargs['end'] = carriage_return
progress = Thread(target=progress_report, args=(status,),
kwargs=kwargs)
progress.start()

log.start_log(ciphertexts.keys())
for _ in range(repetitions):
log.shuffle_new_run()
try:
# create a real order of tests to run
log = Log(os.path.join(outdir, "log.csv"))

log.start_log(ciphertexts.keys())
for i in range(repetitions):
status[0] = i+1
log.shuffle_new_run()
finally:
status[2].set()
progress.join()
print()
print("Log generated.")
log.write()

log.read_log()
test_classes = log.get_classes()

print("Generating ciphertexts...")

status = [0, len(test_classes) * repetitions, Event()]
kwargs = dict()
kwargs['delay'] = status_delay
Expand All @@ -154,7 +172,7 @@ def main():
executed % (len(test_classes) * probe_reuse) == 0:
ciphertexts = marvin_gen.generate()

status[0] = executed
status[0] = executed + 1

g_name = test_classes[index]

Expand Down

0 comments on commit f876258

Please sign in to comment.