Source code for psfsim.example_benchmarks

"""An example module containing simplistic methods under benchmarking."""

import random
import time


[docs] def runtime_computation() -> None: """Runtime computation consuming between 0 and 5 seconds.""" time.sleep(random.uniform(0, 5))
[docs] def memory_computation() -> list[int]: """Memory computation for a random list up to 512 samples.""" return [0] * random.randint(0, 512)