| 1 |
.. |
| 2 |
SPDX-License-Identifier: BSD-3-Clause |
| 3 |
Copyright Contributors to the OpenEXR Project. |
| 4 |
|
| 5 |
exrmetrics |
| 6 |
########## |
| 7 |
|
| 8 |
:: |
| 9 |
|
| 10 |
exrmetrics [options] infile [infile2...] [-o outfile] |
| 11 |
|
| 12 |
Description |
| 13 |
----------- |
| 14 |
|
| 15 |
Read an OpenEXR image from infile, write an identical copy to outfile reporting time taken to read/write and file sizes. |
| 16 |
|
| 17 |
Options: |
| 18 |
-------- |
| 19 |
|
| 20 |
.. describe:: -o file |
| 21 |
|
| 22 |
File to write to. If no file specified, uses a memory buffer. |
| 23 |
|
| 24 |
Note: file may be overwritten multiple times during tests |
| 25 |
|
| 26 |
|
| 27 |
.. describe:: -p n |
| 28 |
|
| 29 |
Part number to copy, or ``all`` for all parts. Default is ``all``. |
| 30 |
|
| 31 |
|
| 32 |
.. describe:: -m |
| 33 |
|
| 34 |
Set to multi-threaded (system selected thread count). |
| 35 |
|
| 36 |
.. describe:: -t n |
| 37 |
|
| 38 |
Use a pool of ``n`` worker threads for processing files. Default is |
| 39 |
single threaded (no thread pool). |
| 40 |
|
| 41 |
.. describe:: -l level |
| 42 |
|
| 43 |
Set DWA or ZIP compression level. |
| 44 |
|
| 45 |
.. describe:: -z,--compression list |
| 46 |
|
| 47 |
List of compression methods to test (``none/rle/zips/zip/piz/pxr24/b44/b44a/dwaa/dwab,orig,all``). |
| 48 |
|
| 49 |
Default is ``orig``: retains original method. |
| 50 |
|
| 51 |
.. describe:: --convert |
| 52 |
|
| 53 |
Shorthand options for writing a new file with no metrics: |
| 54 |
|
| 55 |
``-p all --type orig --time none --type orig --no-size --passes 1`` |
| 56 |
|
| 57 |
Change pixel type or compression by specifying ``--type`` or ``-z`` after ``--convert``. |
| 58 |
|
| 59 |
|
| 60 |
.. describe:: --bench |
| 61 |
|
| 62 |
Shorthand options for robust performance benchmarking: |
| 63 |
|
| 64 |
``-p all --compression all --time write,reread --passes 10 --type half,float --no-size --csv`` |
| 65 |
|
| 66 |
.. describe:: -16 rgba|all |
| 67 |
|
| 68 |
[DEPRECATED] force 16 bit half float: either just RGBA, or all channels. Use ``--type half`` or ``--type mixed`` instead. |
| 69 |
|
| 70 |
.. describe:: --pixelmode list |
| 71 |
|
| 72 |
List of pixel types to use (``float,half,mixed,orig``). ``mixed`` uses half for RGBA, float for others. Default is ``orig``. |
| 73 |
|
| 74 |
.. describe:: --time list |
| 75 |
|
| 76 |
Comma-separated list of operations to report timing for. |
| 77 |
Operations can be any of ``read,write,reread`` (use ``--time none`` for no |
| 78 |
timing) |
| 79 |
|
| 80 |
.. describe:: --no-size |
| 81 |
|
| 82 |
Don't output size data. |
| 83 |
|
| 84 |
.. describe:: --json |
| 85 |
|
| 86 |
Print output as JSON dictionary (default). |
| 87 |
|
| 88 |
.. describe:: --csv |
| 89 |
|
| 90 |
Print output in csv mode. If ``passes>1``, show median timing. Default is ``JSON``. |
| 91 |
|
| 92 |
.. describe:: --passes num |
| 93 |
|
| 94 |
Write and re-read file num times (default is 1) |
| 95 |
|
| 96 |
.. describe:: -h, --help |
| 97 |
|
| 98 |
Print this message |
| 99 |
|
| 100 |
.. describe:: -v |
| 101 |
|
| 102 |
Output progress messages |
| 103 |
|
| 104 |
.. describe:: --version |
| 105 |
|
| 106 |
Print version information |
| 107 |
|
| 108 |
|
| 109 |
Example Usage: |
| 110 |
-------------- |
| 111 |
|
| 112 |
Basic usage: report sizes and read time, write time, reread time. |
| 113 |
|
| 114 |
.. code-block:: |
| 115 |
|
| 116 |
% exrmetrics input.exr -o output.exr |
| 117 |
[ |
| 118 |
{ |
| 119 |
"file": "input.exr", |
| 120 |
"input file size": 3180931, |
| 121 |
"pixels": 396225, |
| 122 |
"channels": 4, |
| 123 |
"total raw size": 3169800, |
| 124 |
"compression": "none", |
| 125 |
"part type": "scanlineimage", |
| 126 |
"parts": |
| 127 |
[ |
| 128 |
{ |
| 129 |
"part": 0, |
| 130 |
"pixels": 396225, |
| 131 |
"channels": 4, |
| 132 |
"compression": "none", |
| 133 |
"part type": "scanlineimage", |
| 134 |
"total raw size": 3169800 |
| 135 |
} |
| 136 |
], |
| 137 |
"metrics": |
| 138 |
[ |
| 139 |
{ |
| 140 |
"compression": "original", |
| 141 |
"pixel mode": "original", |
| 142 |
"output size": 3180960, |
| 143 |
"read time": 0.0061315, |
| 144 |
"write time": 0.0125296, |
| 145 |
"re-read time": 0.00393838 |
| 146 |
} |
| 147 |
] |
| 148 |
} |
| 149 |
] |
| 150 |
|
| 151 |
|
| 152 |
Report read time, write time, re-read time with each available |
| 153 |
compression type: |
| 154 |
|
| 155 |
.. code-block:: |
| 156 |
|
| 157 |
% exrmetrics --bench *.exr |
| 158 |
file name,compression,pixel mode,write time,count reread time,reread time |
| 159 |
input.exr,none,half,0.00147702,---,0.000437916 |
| 160 |
input.exr,none,float,0.00124969,---,0.000425501 |
| 161 |
input.exr,rle,half,0.00655444,---,0.00484196 |
| 162 |
input.exr,rle,float,0.00823504,---,0.006153 |
| 163 |
input.exr,zips,half,0.0243503,---,0.00615663 |
| 164 |
input.exr,zips,float,0.0322755,---,0.00982083 |
| 165 |
input.exr,zip,half,0.0224963,---,0.00438646 |
| 166 |
input.exr,zip,float,0.0351248,---,0.00679192 |
| 167 |
input.exr,piz,half,0.0194071,---,0.00750638 |
| 168 |
input.exr,piz,float,0.0310976,---,0.0124893 |
| 169 |
input.exr,pxr24,half,0.0230168,---,0.00463231 |
| 170 |
input.exr,pxr24,float,0.0280254,---,0.00549154 |
| 171 |
input.exr,b44,half,0.00880035,---,0.00188298 |
| 172 |
input.exr,b44,float,0.0010236,---,0.000360021 |
| 173 |
input.exr,b44a,half,0.00816444,---,0.00159444 |
| 174 |
input.exr,b44a,float,0.00101096,---,0.000393375 |
| 175 |
input.exr,dwaa,half,0.0340554,---,0.00496896 |
| 176 |
input.exr,dwaa,float,0.0372704,---,0.00825308 |
| 177 |
input.exr,dwab,half,0.0249792,---,0.00452442 |
| 178 |
input.exr,dwab,float,0.0286153,---,0.0079899 |
| 179 |
|
| 180 |
|
| 181 |
Just convert the file, printing no metrics: |
| 182 |
|
| 183 |
.. code-block:: |
| 184 |
|
| 185 |
% exrmetrics --convert -z zip input.exr -o output.exr |
| 186 |
|