From b3d5323c29e162d3d340eaf48580c48280399968 Mon Sep 17 00:00:00 2001 From: Jon Nordby Date: Sat, 7 Sep 2024 11:49:39 +0200 Subject: [PATCH] benchmark: Skeleton script --- examples/benchmark/benchmark_readwrite.py | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/benchmark/benchmark_readwrite.py diff --git a/examples/benchmark/benchmark_readwrite.py b/examples/benchmark/benchmark_readwrite.py new file mode 100644 index 0000000..6de7e10 --- /dev/null +++ b/examples/benchmark/benchmark_readwrite.py @@ -0,0 +1,28 @@ + +import time +import io + +import npyfile + + +def main(): + + # do X repetitions of each + # measure total runtime + # compute kB/second + # print human formatted per test + # output a CSV with machine readable results at end + + # write file to memory. io.BytesIO + # write file to disk. open + + # read file from memory + # read file from disk + + + # run for different chunk sizes + # 1, 16, 256, 4096 + + +if __name__ == '__main__': + main()