Skip to content

Tool for benchmarking the saving and loading speed of numpy arrays

License

Notifications You must be signed in to change notification settings

omasoud/np-array-io-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

np-array-io-bench

Tool for benchmarking the saving and loading speed of numpy arrays

Usage

usage: npabench.py [-h] [-s FILE | --max-size MAX_SIZE] [--no-browser]
                   [--save-html-file FILE] [--standalone-html] [--notebook]

Benchmark load/save speeds and summarize results graphically. A results file
is generated and saved. The tool can be also run just to read a results file
and show the results graphically using the --summarize-file argument.

optional arguments:
  -h, --help            show this help message and exit
  -s FILE, --summarize-file FILE
                        Only generate summary graphs based on provided results
                        file. This will not run the benchmark.
  --max-size MAX_SIZE   Maximum file size (must be a power of 2) to benchmark
                        (e.g, 8MB, 4GB, 128KB). Default: 1MB. Caution: large
                        sizes can take a very long time or run out of memory
                        or disk space. 16GB takes about 90 minutes on a fast
                        computer.
  --no-browser          Do not launch a browser tab to display the results.
  --save-html-file FILE
                        If desired, provide filename so that html report gets
                        saved to it.
  --standalone-html     By default the html will reference generated png files
                        for the figures. But if desired this option can encode
                        the pngs directly in the html (making it larger but
                        standalone).                        
  --notebook            Plot results in Jupyter Notebook.

Installation

pip install -r requirements.txt

If using conda:
(normally requirements.txt can also be used here as well but tables has a different name on conda (pytables); hence, the yml file)

conda activate base
conda env create --name npabench python=3.9 --file environment.yml
conda activate npabench

Example

python npabench.py --max-size 16mb

Benchmark Result:

https://omasoud.github.io/np-array-io-bench

Copyright (c) 2022 O. Masoud

About

Tool for benchmarking the saving and loading speed of numpy arrays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published