bench9000 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +7 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-bilinear.rb +69 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-nearest-neighbor.rb +68 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-steps-residues.rb +37 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-steps.rb +37 -0
- data/benchmarks/chunky_png/chunky-color-a.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-b.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-compose-quick.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-g.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-r.rb +39 -0
- data/benchmarks/chunky_png/chunky-decode-png-image-pass.rb +74 -0
- data/benchmarks/chunky_png/chunky-encode-png-image-pass-to-stream.rb +84 -0
- data/benchmarks/chunky_png/chunky-operations-compose.rb +70 -0
- data/benchmarks/chunky_png/chunky-operations-replace.rb +69 -0
- data/benchmarks/chunky_png/chunky_png.patch +22 -0
- data/benchmarks/chunky_png/version.txt +2 -0
- data/benchmarks/classic/binary-trees.rb +100 -0
- data/benchmarks/classic/deltablue.rb +732 -0
- data/benchmarks/classic/fannkuch-redux.rb +111 -0
- data/benchmarks/classic/fasta-string.rb +71 -0
- data/benchmarks/classic/mandelbrot.rb +112 -0
- data/benchmarks/classic/matrix-multiply.rb +78 -0
- data/benchmarks/classic/n-body.rb +188 -0
- data/benchmarks/classic/pidigits.rb +88 -0
- data/benchmarks/classic/red-black.rb +363 -0
- data/benchmarks/classic/richards-kwargs.rb +403 -0
- data/benchmarks/classic/richards.rb +403 -0
- data/benchmarks/classic/spectral-norm.rb +95 -0
- data/benchmarks/default.config.rb +206 -0
- data/benchmarks/graph/connected.rb +62 -0
- data/benchmarks/literature/acid.rb +46 -0
- data/benchmarks/micro/pack-big-U-loop.rb +24 -0
- data/benchmarks/micro/pack-big-xLX-repeat.rb +22 -0
- data/benchmarks/micro/pack-small-mixture.rb +17 -0
- data/benchmarks/micro/string-equal.rb +28 -0
- data/benchmarks/octane/deltablue.rb +981 -0
- data/benchmarks/psd.rb/mock-logger.rb +23 -0
- data/benchmarks/psd.rb/psd-color-cmyk-to-rgb.rb +46 -0
- data/benchmarks/psd.rb/psd-compose-color-burn.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-color-dodge.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-darken.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-difference.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-exclusion.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-hard-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-hard-mix.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-lighten.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-burn.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-dodge.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-multiply.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-normal.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-overlay.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-pin-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-screen.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-soft-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-vivid-light.rb +43 -0
- data/benchmarks/psd.rb/psd-imageformat-layerraw-parse-raw.rb +70 -0
- data/benchmarks/psd.rb/psd-imageformat-rle-decode-rle-channel.rb +87 -0
- data/benchmarks/psd.rb/psd-imagemode-cmyk-combine-cmyk-channel.rb +65 -0
- data/benchmarks/psd.rb/psd-imagemode-greyscale-combine-greyscale-channel.rb +68 -0
- data/benchmarks/psd.rb/psd-imagemode-rgb-combine-rgb-channel.rb +65 -0
- data/benchmarks/psd.rb/psd-renderer-blender-compose.rb +113 -0
- data/benchmarks/psd.rb/psd-renderer-clippingmask-apply.rb +129 -0
- data/benchmarks/psd.rb/psd-renderer-mask-apply.rb +137 -0
- data/benchmarks/psd.rb/psd-util-clamp.rb +42 -0
- data/benchmarks/psd.rb/psd-util-pad2.rb +42 -0
- data/benchmarks/psd.rb/psd-util-pad4.rb +42 -0
- data/benchmarks/psd.rb/psd_native.patch +99 -0
- data/benchmarks/psd.rb/version.txt +2 -0
- data/benchmarks/topaz/neural-net.rb +208 -0
- data/benchmarks/vm/codeload.rb +35 -0
- data/benchmarks/vm/fixtures/codeload/LICENSE.txt +25 -0
- data/benchmarks/vm/fixtures/codeload/lexer.rb +21493 -0
- data/bin/bench9000 +13 -0
- data/example/report.data +945 -0
- data/example/report.html +59178 -0
- data/lib/bench9000.rb +27 -0
- data/lib/bench9000/benchmark.rb +29 -0
- data/lib/bench9000/commands/command.rb +30 -0
- data/lib/bench9000/commands/compare-reference.rb +70 -0
- data/lib/bench9000/commands/compare.rb +43 -0
- data/lib/bench9000/commands/detail.rb +51 -0
- data/lib/bench9000/commands/list-benchmarks.rb +29 -0
- data/lib/bench9000/commands/list-implementations.rb +29 -0
- data/lib/bench9000/commands/reference.rb +46 -0
- data/lib/bench9000/commands/remove.rb +41 -0
- data/lib/bench9000/commands/report.rb +71 -0
- data/lib/bench9000/commands/score.rb +27 -0
- data/lib/bench9000/config.rb +88 -0
- data/lib/bench9000/group.rb +23 -0
- data/lib/bench9000/harness.rb +68 -0
- data/lib/bench9000/implementation.rb +134 -0
- data/lib/bench9000/json-formatter.rb +50 -0
- data/lib/bench9000/main.rb +268 -0
- data/lib/bench9000/measurement.rb +75 -0
- data/lib/bench9000/micro-harness.rb +39 -0
- data/lib/bench9000/options.rb +31 -0
- data/lib/bench9000/report/bootstrap-theme.css +5 -0
- data/lib/bench9000/report/bootstrap.css +5 -0
- data/lib/bench9000/report/bootstrap.js +6 -0
- data/lib/bench9000/report/chart.js +3432 -0
- data/lib/bench9000/report/chartjs.patch +91 -0
- data/lib/bench9000/report/jquery.js +4 -0
- data/lib/bench9000/report/report.html +177 -0
- data/lib/bench9000/report/report.js +547 -0
- data/lib/bench9000/stats.rb +41 -0
- data/readme.md +205 -0
- data/vendor/chunky_png/BENCHMARKS.rdoc +31 -0
- data/vendor/chunky_png/Gemfile +10 -0
- data/vendor/chunky_png/LICENSE +20 -0
- data/vendor/chunky_png/README.rdoc +84 -0
- data/vendor/chunky_png/Rakefile +11 -0
- data/vendor/chunky_png/benchmarks/decoding_benchmark.rb +36 -0
- data/vendor/chunky_png/benchmarks/encoding_benchmark.rb +40 -0
- data/vendor/chunky_png/benchmarks/filesize_benchmark.rb +28 -0
- data/vendor/chunky_png/chunky_png.gemspec +47 -0
- data/vendor/chunky_png/lib/chunky_png.rb +160 -0
- data/vendor/chunky_png/lib/chunky_png/canvas.rb +372 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/adam7_interlacing.rb +72 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/data_url_exporting.rb +15 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/data_url_importing.rb +21 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/drawing.rb +338 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/masking.rb +91 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/operations.rb +395 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/png_decoding.rb +492 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/png_encoding.rb +442 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/resampling.rb +147 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/stream_exporting.rb +58 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/stream_importing.rb +77 -0
- data/vendor/chunky_png/lib/chunky_png/chunk.rb +328 -0
- data/vendor/chunky_png/lib/chunky_png/color.rb +780 -0
- data/vendor/chunky_png/lib/chunky_png/compatibility.rb +15 -0
- data/vendor/chunky_png/lib/chunky_png/datastream.rb +185 -0
- data/vendor/chunky_png/lib/chunky_png/dimension.rb +113 -0
- data/vendor/chunky_png/lib/chunky_png/image.rb +79 -0
- data/vendor/chunky_png/lib/chunky_png/palette.rb +209 -0
- data/vendor/chunky_png/lib/chunky_png/point.rb +115 -0
- data/vendor/chunky_png/lib/chunky_png/rmagick.rb +43 -0
- data/vendor/chunky_png/lib/chunky_png/vector.rb +186 -0
- data/vendor/chunky_png/lib/chunky_png/version.rb +5 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/adam7_interlacing_spec.rb +106 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/data_url_exporting_spec.rb +13 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/data_url_importing_spec.rb +15 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/drawing_spec.rb +170 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/masking_spec.rb +51 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/operations_spec.rb +388 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/png_decoding_spec.rb +97 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/png_encoding_spec.rb +235 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/resampling_spec.rb +121 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/stream_exporting_spec.rb +59 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/stream_importing_spec.rb +31 -0
- data/vendor/chunky_png/spec/chunky_png/canvas_spec.rb +226 -0
- data/vendor/chunky_png/spec/chunky_png/color_spec.rb +251 -0
- data/vendor/chunky_png/spec/chunky_png/datastream_spec.rb +32 -0
- data/vendor/chunky_png/spec/chunky_png/dimension_spec.rb +48 -0
- data/vendor/chunky_png/spec/chunky_png/image_spec.rb +25 -0
- data/vendor/chunky_png/spec/chunky_png/point_spec.rb +76 -0
- data/vendor/chunky_png/spec/chunky_png/rmagick_spec.rb +23 -0
- data/vendor/chunky_png/spec/chunky_png/vector_spec.rb +104 -0
- data/vendor/chunky_png/spec/chunky_png_spec.rb +8 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgbn4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bggn4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgwn6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgyn6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g01.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p01.rgba +1 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g01.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p01.rgba +1 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/x00n0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/xcrn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/xlfn0g04.png +13 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z00n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z06n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z09n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm0n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm7n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm9n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ccwn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ccwn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdfn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdhn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdsn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdun2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ch1n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ch2n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs3n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs3n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs5n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs5n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs8n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs8n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ct0n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ct1n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ctzn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/pp0n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/pp0n6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps1n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps1n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps2n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps2n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s01i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s01n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s02i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s02n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s03i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s03n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s04i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s04n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s05i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s05n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s06i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s06n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s07i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s07n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s08i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s08n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s09i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s09n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s32i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s32n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s33i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s33n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s34i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s34n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s35i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s35n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s36i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s36n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s37i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s37n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s38i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s38n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s39i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s39n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s40i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s40n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn1g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbgn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbgn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbrn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbwn1g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbwn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbyn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n1g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp1n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite_spec.rb +121 -0
- data/vendor/chunky_png/spec/resources/adam7.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_five_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point_flipped.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point_s.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_six_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_three_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_three_point_flipped.png +0 -0
- data/vendor/chunky_png/spec/resources/circles.png +0 -0
- data/vendor/chunky_png/spec/resources/clock.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_base.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xdown_ydown.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xdown_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xup_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_mask.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_mask_updated.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xdown_ydown.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xdown_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xup_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_updated.png +0 -0
- data/vendor/chunky_png/spec/resources/composited.png +0 -0
- data/vendor/chunky_png/spec/resources/cropped.png +0 -0
- data/vendor/chunky_png/spec/resources/damaged_chunk.png +0 -0
- data/vendor/chunky_png/spec/resources/damaged_signature.png +13 -0
- data/vendor/chunky_png/spec/resources/lines.png +0 -0
- data/vendor/chunky_png/spec/resources/operations.png +0 -0
- data/vendor/chunky_png/spec/resources/operations_border.png +0 -0
- data/vendor/chunky_png/spec/resources/operations_grayscale.png +0 -0
- data/vendor/chunky_png/spec/resources/partial_circles.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream.bgr +67 -0
- data/vendor/chunky_png/spec/resources/pixelstream.rgb +67 -1
- data/vendor/chunky_png/spec/resources/pixelstream.rgba +67 -0
- data/vendor/chunky_png/spec/resources/pixelstream_best_compression.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream_fast_rgba.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream_reference.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_filled_horizontal.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_filled_vertical.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_triangle_filled.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_unfilled.png +0 -0
- data/vendor/chunky_png/spec/resources/rect.png +0 -0
- data/vendor/chunky_png/spec/resources/replaced.png +0 -0
- data/vendor/chunky_png/spec/resources/text_chunk.png +0 -0
- data/vendor/chunky_png/spec/resources/ztxt_chunk.png +0 -0
- data/vendor/chunky_png/spec/spec_helper.rb +52 -0
- data/vendor/chunky_png/tasks/benchmarks.rake +26 -0
- data/vendor/oily_png/Gemfile +4 -0
- data/vendor/oily_png/LICENSE +20 -0
- data/vendor/oily_png/README.rdoc +26 -0
- data/vendor/oily_png/Rakefile +19 -0
- data/vendor/oily_png/ext/oily_png/color.c +58 -0
- data/vendor/oily_png/ext/oily_png/color.h +29 -0
- data/vendor/oily_png/ext/oily_png/extconf.rb +3 -0
- data/vendor/oily_png/ext/oily_png/oily_png_ext.c +59 -0
- data/vendor/oily_png/ext/oily_png/oily_png_ext.h +72 -0
- data/vendor/oily_png/ext/oily_png/operations.c +122 -0
- data/vendor/oily_png/ext/oily_png/operations.h +36 -0
- data/vendor/oily_png/ext/oily_png/png_decoding.c +374 -0
- data/vendor/oily_png/ext/oily_png/png_decoding.h +27 -0
- data/vendor/oily_png/ext/oily_png/png_encoding.c +302 -0
- data/vendor/oily_png/ext/oily_png/png_encoding.h +19 -0
- data/vendor/oily_png/ext/oily_png/resampling.c +213 -0
- data/vendor/oily_png/ext/oily_png/resampling.h +25 -0
- data/vendor/oily_png/lib/oily_png.rb +21 -0
- data/vendor/oily_png/lib/oily_png/canvas.rb +15 -0
- data/vendor/oily_png/lib/oily_png/version.rb +3 -0
- data/vendor/oily_png/oily_png.gemspec +39 -0
- data/vendor/oily_png/spec/color_spec.rb +38 -0
- data/vendor/oily_png/spec/decoding_spec.rb +51 -0
- data/vendor/oily_png/spec/encoding_spec.rb +135 -0
- data/vendor/oily_png/spec/operations_spec.rb +52 -0
- data/vendor/oily_png/spec/resampling_spec.rb +51 -0
- data/vendor/oily_png/spec/resources/basi0g01.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g02.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g04.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g08.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g16.png +0 -0
- data/vendor/oily_png/spec/resources/basi2c08.png +0 -0
- data/vendor/oily_png/spec/resources/basi2c16.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p01.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p02.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p04.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p08.png +0 -0
- data/vendor/oily_png/spec/resources/basi4a08.png +0 -0
- data/vendor/oily_png/spec/resources/basi4a16.png +0 -0
- data/vendor/oily_png/spec/resources/basi6a08.png +0 -0
- data/vendor/oily_png/spec/resources/basi6a16.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g01.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g02.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g04.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g08.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g16.png +0 -0
- data/vendor/oily_png/spec/resources/basn2c08.png +0 -0
- data/vendor/oily_png/spec/resources/basn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p01.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p02.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p04.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/basn4a08.png +0 -0
- data/vendor/oily_png/spec/resources/basn4a16.png +0 -0
- data/vendor/oily_png/spec/resources/basn6a08.png +0 -0
- data/vendor/oily_png/spec/resources/basn6a16.png +0 -0
- data/vendor/oily_png/spec/resources/composited.png +0 -0
- data/vendor/oily_png/spec/resources/gray.png +0 -0
- data/vendor/oily_png/spec/resources/interlaced.png +0 -0
- data/vendor/oily_png/spec/resources/nonsquare.png +0 -0
- data/vendor/oily_png/spec/resources/operations.png +0 -0
- data/vendor/oily_png/spec/resources/replaced.png +0 -0
- data/vendor/oily_png/spec/resources/s01i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s01n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s02i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s02n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s03i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s03n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s04i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s04n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s05i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s05n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s06i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s06n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s07i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s07n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s08i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s08n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s09i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s09n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s32i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s32n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s33i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s33n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s34i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s34n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s35i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s35n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s36i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s36n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s37i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s37n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s38i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s38n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s39i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s39n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s40i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s40n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/square.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn1g04.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbgn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/tbgn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbrn2c08.png +0 -0
- data/vendor/oily_png/spec/resources/tbwn1g16.png +0 -0
- data/vendor/oily_png/spec/resources/tbwn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbyn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n1g08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n2c08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tp1n3p08.png +0 -0
- data/vendor/oily_png/spec/spec_helper.rb +40 -0
- data/vendor/oily_png/tasks/testing.rake +49 -0
- data/vendor/psd.rb/CONTRIBUTING.md +7 -0
- data/vendor/psd.rb/Gemfile +2 -0
- data/vendor/psd.rb/Guardfile +8 -0
- data/vendor/psd.rb/LICENSE.txt +22 -0
- data/vendor/psd.rb/README.md +235 -0
- data/vendor/psd.rb/Rakefile +6 -0
- data/vendor/psd.rb/circle.yml +6 -0
- data/vendor/psd.rb/examples/build_image.rb +16 -0
- data/vendor/psd.rb/examples/export_image.rb +12 -0
- data/vendor/psd.rb/examples/export_layer_images.rb +19 -0
- data/vendor/psd.rb/examples/export_node.rb +7 -0
- data/vendor/psd.rb/examples/export_text_data.rb +13 -0
- data/vendor/psd.rb/examples/guides.rb +17 -0
- data/vendor/psd.rb/examples/images/comp-example.psd +0 -0
- data/vendor/psd.rb/examples/images/example-cmyk.psd +0 -0
- data/vendor/psd.rb/examples/images/example-greyscale.psd +0 -0
- data/vendor/psd.rb/examples/images/example-nocompat.psd +0 -0
- data/vendor/psd.rb/examples/images/example.psd +0 -0
- data/vendor/psd.rb/examples/images/example16.psd +0 -0
- data/vendor/psd.rb/examples/images/guides.psd +0 -0
- data/vendor/psd.rb/examples/layer_comps.rb +20 -0
- data/vendor/psd.rb/examples/parse.rb +36 -0
- data/vendor/psd.rb/examples/path.rb +7 -0
- data/vendor/psd.rb/examples/profile.rb +15 -0
- data/vendor/psd.rb/examples/slices.rb +17 -0
- data/vendor/psd.rb/examples/tree.rb +8 -0
- data/vendor/psd.rb/examples/unimplemented_info.rb +9 -0
- data/vendor/psd.rb/lib/psd.rb +173 -0
- data/vendor/psd.rb/lib/psd/blend_mode.rb +80 -0
- data/vendor/psd.rb/lib/psd/channel_image.rb +115 -0
- data/vendor/psd.rb/lib/psd/color.rb +125 -0
- data/vendor/psd.rb/lib/psd/descriptor.rb +200 -0
- data/vendor/psd.rb/lib/psd/file.rb +104 -0
- data/vendor/psd.rb/lib/psd/header.rb +69 -0
- data/vendor/psd.rb/lib/psd/helpers.rb +51 -0
- data/vendor/psd.rb/lib/psd/image.rb +123 -0
- data/vendor/psd.rb/lib/psd/image_exports/png.rb +31 -0
- data/vendor/psd.rb/lib/psd/image_formats/layer_raw.rb +21 -0
- data/vendor/psd.rb/lib/psd/image_formats/layer_rle.rb +24 -0
- data/vendor/psd.rb/lib/psd/image_formats/raw.rb +12 -0
- data/vendor/psd.rb/lib/psd/image_formats/rle.rb +63 -0
- data/vendor/psd.rb/lib/psd/image_modes/cmyk.rb +31 -0
- data/vendor/psd.rb/lib/psd/image_modes/greyscale.rb +22 -0
- data/vendor/psd.rb/lib/psd/image_modes/rgb.rb +32 -0
- data/vendor/psd.rb/lib/psd/layer.rb +77 -0
- data/vendor/psd.rb/lib/psd/layer/blend_modes.rb +30 -0
- data/vendor/psd.rb/lib/psd/layer/blending_ranges.rb +62 -0
- data/vendor/psd.rb/lib/psd/layer/channel_image.rb +15 -0
- data/vendor/psd.rb/lib/psd/layer/exporting.rb +28 -0
- data/vendor/psd.rb/lib/psd/layer/helpers.rb +77 -0
- data/vendor/psd.rb/lib/psd/layer/info.rb +74 -0
- data/vendor/psd.rb/lib/psd/layer/mask.rb +19 -0
- data/vendor/psd.rb/lib/psd/layer/name.rb +33 -0
- data/vendor/psd.rb/lib/psd/layer/path_components.rb +22 -0
- data/vendor/psd.rb/lib/psd/layer/position_and_channels.rb +47 -0
- data/vendor/psd.rb/lib/psd/layer_info.rb +27 -0
- data/vendor/psd.rb/lib/psd/layer_info/blend_clipping_elements.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/blend_interior_elements.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/fill_opacity.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_group.rb +30 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_id.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_name_source.rb +14 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_section_divider.rb +48 -0
- data/vendor/psd.rb/lib/psd/layer_info/legacy_typetool.rb +88 -0
- data/vendor/psd.rb/lib/psd/layer_info/locked.rb +19 -0
- data/vendor/psd.rb/lib/psd/layer_info/metadata_setting.rb +35 -0
- data/vendor/psd.rb/lib/psd/layer_info/object_effects.rb +16 -0
- data/vendor/psd.rb/lib/psd/layer_info/placed_layer.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/reference_point.rb +16 -0
- data/vendor/psd.rb/lib/psd/layer_info/typetool.rb +165 -0
- data/vendor/psd.rb/lib/psd/layer_info/unicode_name.rb +17 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_mask.rb +25 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_mask_2.rb +10 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_stroke.rb +12 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_stroke_content.rb +15 -0
- data/vendor/psd.rb/lib/psd/layer_mask.rb +129 -0
- data/vendor/psd.rb/lib/psd/lazy_execute.rb +60 -0
- data/vendor/psd.rb/lib/psd/logger.rb +40 -0
- data/vendor/psd.rb/lib/psd/mask.rb +74 -0
- data/vendor/psd.rb/lib/psd/node.rb +70 -0
- data/vendor/psd.rb/lib/psd/node_exporting.rb +20 -0
- data/vendor/psd.rb/lib/psd/node_group.rb +86 -0
- data/vendor/psd.rb/lib/psd/node_layer.rb +81 -0
- data/vendor/psd.rb/lib/psd/node_root.rb +93 -0
- data/vendor/psd.rb/lib/psd/nodes/ancestry.rb +98 -0
- data/vendor/psd.rb/lib/psd/nodes/build_preview.rb +17 -0
- data/vendor/psd.rb/lib/psd/nodes/has_children.rb +13 -0
- data/vendor/psd.rb/lib/psd/nodes/lock_to_origin.rb +7 -0
- data/vendor/psd.rb/lib/psd/nodes/parse_layers.rb +18 -0
- data/vendor/psd.rb/lib/psd/nodes/search.rb +91 -0
- data/vendor/psd.rb/lib/psd/path_record.rb +180 -0
- data/vendor/psd.rb/lib/psd/renderer.rb +91 -0
- data/vendor/psd.rb/lib/psd/renderer/blender.rb +53 -0
- data/vendor/psd.rb/lib/psd/renderer/canvas.rb +95 -0
- data/vendor/psd.rb/lib/psd/renderer/canvas_management.rb +26 -0
- data/vendor/psd.rb/lib/psd/renderer/clipping_mask.rb +41 -0
- data/vendor/psd.rb/lib/psd/renderer/compose.rb +361 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles.rb +56 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles/color_overlay.rb +65 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles/drop_shadow.rb +75 -0
- data/vendor/psd.rb/lib/psd/renderer/mask.rb +46 -0
- data/vendor/psd.rb/lib/psd/resource.rb +26 -0
- data/vendor/psd.rb/lib/psd/resource_section.rb +22 -0
- data/vendor/psd.rb/lib/psd/resources.rb +69 -0
- data/vendor/psd.rb/lib/psd/resources/guides.rb +35 -0
- data/vendor/psd.rb/lib/psd/resources/layer_comps.rb +42 -0
- data/vendor/psd.rb/lib/psd/resources/slices.rb +132 -0
- data/vendor/psd.rb/lib/psd/section.rb +26 -0
- data/vendor/psd.rb/lib/psd/util.rb +18 -0
- data/vendor/psd.rb/lib/psd/version.rb +3 -0
- data/vendor/psd.rb/psd.gemspec +32 -0
- data/vendor/psd.rb/spec/files/blendmodes.psd +0 -0
- data/vendor/psd.rb/spec/files/empty-layer-subgroups.psd +0 -0
- data/vendor/psd.rb/spec/files/empty-layer.psd +0 -0
- data/vendor/psd.rb/spec/files/example.psd +0 -0
- data/vendor/psd.rb/spec/files/guides.psd +0 -0
- data/vendor/psd.rb/spec/files/locked.psd +0 -0
- data/vendor/psd.rb/spec/files/one_layer.psd +0 -0
- data/vendor/psd.rb/spec/files/path.psd +0 -0
- data/vendor/psd.rb/spec/files/pixel.psd +0 -0
- data/vendor/psd.rb/spec/files/simplest.psd +0 -0
- data/vendor/psd.rb/spec/files/slices.psd +0 -0
- data/vendor/psd.rb/spec/files/text.psd +0 -0
- data/vendor/psd.rb/spec/guides_spec.rb +34 -0
- data/vendor/psd.rb/spec/hierarchy_spec.rb +152 -0
- data/vendor/psd.rb/spec/image_spec.rb +86 -0
- data/vendor/psd.rb/spec/lazy_execute_spec.rb +20 -0
- data/vendor/psd.rb/spec/locked_spec.rb +78 -0
- data/vendor/psd.rb/spec/parsing_spec.rb +163 -0
- data/vendor/psd.rb/spec/psd_spec.rb +37 -0
- data/vendor/psd.rb/spec/slices_spec.rb +57 -0
- data/vendor/psd.rb/spec/spec_helper.rb +13 -0
- data/vendor/psd.rb/spec/text_spec.rb +27 -0
- data/vendor/psd_native/Gemfile +4 -0
- data/vendor/psd_native/Guardfile +6 -0
- data/vendor/psd_native/LICENSE.txt +22 -0
- data/vendor/psd_native/README.md +48 -0
- data/vendor/psd_native/Rakefile +13 -0
- data/vendor/psd_native/ext/psd_native/blender.c +57 -0
- data/vendor/psd_native/ext/psd_native/blender.h +6 -0
- data/vendor/psd_native/ext/psd_native/canvas.c +9 -0
- data/vendor/psd_native/ext/psd_native/canvas.h +6 -0
- data/vendor/psd_native/ext/psd_native/clipping_mask.c +57 -0
- data/vendor/psd_native/ext/psd_native/clipping_mask.h +6 -0
- data/vendor/psd_native/ext/psd_native/color.c +20 -0
- data/vendor/psd_native/ext/psd_native/color.h +18 -0
- data/vendor/psd_native/ext/psd_native/compose.c +394 -0
- data/vendor/psd_native/ext/psd_native/compose.h +43 -0
- data/vendor/psd_native/ext/psd_native/extconf.rb +3 -0
- data/vendor/psd_native/ext/psd_native/file.c +20 -0
- data/vendor/psd_native/ext/psd_native/file.h +9 -0
- data/vendor/psd_native/ext/psd_native/image_mode_cmyk.c +64 -0
- data/vendor/psd_native/ext/psd_native/image_mode_cmyk.h +6 -0
- data/vendor/psd_native/ext/psd_native/image_mode_greyscale.c +27 -0
- data/vendor/psd_native/ext/psd_native/image_mode_greyscale.h +6 -0
- data/vendor/psd_native/ext/psd_native/image_mode_rgb.c +49 -0
- data/vendor/psd_native/ext/psd_native/image_mode_rgb.h +6 -0
- data/vendor/psd_native/ext/psd_native/layer_raw.c +20 -0
- data/vendor/psd_native/ext/psd_native/layer_raw.h +6 -0
- data/vendor/psd_native/ext/psd_native/mask.c +52 -0
- data/vendor/psd_native/ext/psd_native/mask.h +6 -0
- data/vendor/psd_native/ext/psd_native/psd_native_ext.c +87 -0
- data/vendor/psd_native/ext/psd_native/psd_native_ext.h +31 -0
- data/vendor/psd_native/ext/psd_native/rle_decoding.c +53 -0
- data/vendor/psd_native/ext/psd_native/rle_decoding.h +6 -0
- data/vendor/psd_native/ext/psd_native/util.c +17 -0
- data/vendor/psd_native/ext/psd_native/util.h +8 -0
- data/vendor/psd_native/lib/psd_native.rb +35 -0
- data/vendor/psd_native/lib/psd_native/compose.rb +19 -0
- data/vendor/psd_native/lib/psd_native/version.rb +3 -0
- data/vendor/psd_native/psd_native.gemspec +35 -0
- data/vendor/psd_native/spec/files/example.psd +0 -0
- data/vendor/psd_native/spec/files/one_layer.psd +0 -0
- data/vendor/psd_native/spec/files/path.psd +0 -0
- data/vendor/psd_native/spec/files/pixel.psd +0 -0
- data/vendor/psd_native/spec/files/simplest.psd +0 -0
- data/vendor/psd_native/spec/files/text.psd +0 -0
- data/vendor/psd_native/spec/image_spec.rb +86 -0
- data/vendor/psd_native/spec/psd_spec.rb +37 -0
- data/vendor/psd_native/spec/spec_helper.rb +13 -0
- data/vendor/psd_native/spec/util_spec.rb +15 -0
- metadata +767 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
module Bench
|
10
|
+
module Commands
|
11
|
+
|
12
|
+
class Score < Command
|
13
|
+
|
14
|
+
def result(options, b, i, measurement)
|
15
|
+
if measurement == :failed
|
16
|
+
score = "failed"
|
17
|
+
else
|
18
|
+
score = measurement.score
|
19
|
+
end
|
20
|
+
|
21
|
+
puts "#{b} #{i} #{score}"
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
module Bench
|
10
|
+
|
11
|
+
class Config
|
12
|
+
|
13
|
+
attr_reader :implementations
|
14
|
+
attr_reader :implementation_groups
|
15
|
+
attr_reader :benchmarks
|
16
|
+
attr_reader :benchmark_groups
|
17
|
+
attr_reader :fail_hard_exclusions
|
18
|
+
attr_reader :commands
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@implementations = {}
|
22
|
+
@implementation_groups = {}
|
23
|
+
@benchmarks = {}
|
24
|
+
@benchmark_groups = {}
|
25
|
+
@fail_hard_exclusions = []
|
26
|
+
@commands = {}
|
27
|
+
end
|
28
|
+
|
29
|
+
def load(file)
|
30
|
+
@configuration_file_path = file
|
31
|
+
eval File.read(file), binding, file, 1
|
32
|
+
end
|
33
|
+
|
34
|
+
def rbenv(name, version=name, flags="")
|
35
|
+
@implementations[name] = RbenvImplementation.new(name, version, flags)
|
36
|
+
end
|
37
|
+
|
38
|
+
def binary(name, binary, flags="")
|
39
|
+
@implementations[name] = BinaryImplementation.new(name, binary, flags)
|
40
|
+
end
|
41
|
+
|
42
|
+
def implementation_group(name, *implementations)
|
43
|
+
@implementation_groups[name] = Group.new(name, implementations.map { |i|
|
44
|
+
implementation = @implementations[i]
|
45
|
+
|
46
|
+
if implementation.nil?
|
47
|
+
puts "unknown implementation #{i} in group"
|
48
|
+
exit
|
49
|
+
end
|
50
|
+
|
51
|
+
implementation
|
52
|
+
})
|
53
|
+
end
|
54
|
+
|
55
|
+
def default_benchmarks_dir
|
56
|
+
File.expand_path(File.dirname(@configuration_file_path))
|
57
|
+
end
|
58
|
+
|
59
|
+
def benchmark(name, file, flags="")
|
60
|
+
@benchmarks[name] = Benchmark.new(name, file, flags)
|
61
|
+
end
|
62
|
+
|
63
|
+
def benchmark_group(name, *benchmarks)
|
64
|
+
@benchmark_groups[name] = Group.new(name, benchmarks.map { |b|
|
65
|
+
benchmark = @benchmarks[b]
|
66
|
+
|
67
|
+
if benchmark.nil?
|
68
|
+
puts "unknown benchmark #{b} in group"
|
69
|
+
exit
|
70
|
+
end
|
71
|
+
|
72
|
+
benchmark
|
73
|
+
})
|
74
|
+
end
|
75
|
+
|
76
|
+
def fails_hard(implementation, benchmark)
|
77
|
+
@fail_hard_exclusions.push([implementation, benchmark])
|
78
|
+
end
|
79
|
+
|
80
|
+
def command(name, &body)
|
81
|
+
command_class = Class.new(Commands::Command)
|
82
|
+
command_class.class_eval(&body)
|
83
|
+
@commands[name] = command_class
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
module Bench
|
10
|
+
|
11
|
+
class Group
|
12
|
+
|
13
|
+
attr_reader :name
|
14
|
+
attr_reader :members
|
15
|
+
|
16
|
+
def initialize(name, members)
|
17
|
+
@name = name
|
18
|
+
@members = members
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
# This file should be kept as simple as possible to accommodate early
|
10
|
+
# implementations of Ruby.
|
11
|
+
|
12
|
+
if ARGV[0] == "--loopn"
|
13
|
+
ITERATIONS = ARGV[1].to_i
|
14
|
+
INNER_ITERATIONS = ARGV[2].to_i
|
15
|
+
|
16
|
+
def micro_harness_iterations
|
17
|
+
INNER_ITERATIONS
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
begin
|
22
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC) # test
|
23
|
+
def bench9000_get_time
|
24
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
25
|
+
end
|
26
|
+
rescue Exception
|
27
|
+
def bench9000_get_time
|
28
|
+
Time.now
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
iteration = 0
|
33
|
+
|
34
|
+
while true
|
35
|
+
input = harness_input
|
36
|
+
|
37
|
+
start = bench9000_get_time
|
38
|
+
actual_output = harness_sample(input)
|
39
|
+
time = bench9000_get_time - start
|
40
|
+
|
41
|
+
unless harness_verify(actual_output)
|
42
|
+
puts "error"
|
43
|
+
exit
|
44
|
+
end
|
45
|
+
|
46
|
+
puts time
|
47
|
+
|
48
|
+
# Some implementations of Ruby will not flush each line when writing to a pipe
|
49
|
+
|
50
|
+
begin
|
51
|
+
STDOUT.flush
|
52
|
+
rescue Errno::EPIPE
|
53
|
+
# Not the cleanest solution, but if the previous `puts` call reaches the parent and the parent exits before the
|
54
|
+
# `flush` call is encountered, we may end up writing to a closed pipe. If the parent has closed, there's not much
|
55
|
+
# can do, so we'll just exit and hope for the best.
|
56
|
+
break
|
57
|
+
end
|
58
|
+
|
59
|
+
if ARGV[0] == "--loop"
|
60
|
+
next
|
61
|
+
elsif ARGV[0] == "--loopn"
|
62
|
+
iteration += 1
|
63
|
+
break if iteration == ITERATIONS
|
64
|
+
else
|
65
|
+
command = gets
|
66
|
+
break unless command == "continue" || command == "continue\n"
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
module Bench
|
10
|
+
|
11
|
+
class Implementation
|
12
|
+
|
13
|
+
BEFORE_WARMUP_TIME = 30
|
14
|
+
WARMUP_WINDOW_SIZE = 20
|
15
|
+
WARMED_UP_RELATIVE_RANGE = 0.1
|
16
|
+
MAX_WARMUP = 100
|
17
|
+
MAX_WARMUP_TIME = 4 * 60
|
18
|
+
SAMPLES_COUNT = 10
|
19
|
+
|
20
|
+
attr_reader :name
|
21
|
+
|
22
|
+
def initialize(name)
|
23
|
+
@name = name
|
24
|
+
end
|
25
|
+
|
26
|
+
def measure(flags, benchmark)
|
27
|
+
command = "bash -c \"#{command(benchmark)}\""
|
28
|
+
|
29
|
+
puts command if flags.has_key? "--show-commands"
|
30
|
+
|
31
|
+
warming_up = true
|
32
|
+
warmup_window = []
|
33
|
+
warmup_samples = []
|
34
|
+
samples = []
|
35
|
+
|
36
|
+
overall_time = Time.now
|
37
|
+
|
38
|
+
IO.popen command, "r+" do |subprocess|
|
39
|
+
while true
|
40
|
+
line = subprocess.gets
|
41
|
+
|
42
|
+
if line.nil? || line == "error"
|
43
|
+
return :failed
|
44
|
+
end
|
45
|
+
|
46
|
+
unless line.match(/\d+\.\d+/)
|
47
|
+
STDERR.puts line
|
48
|
+
next
|
49
|
+
end
|
50
|
+
|
51
|
+
time = line.to_f
|
52
|
+
puts time if flags.has_key? "--show-samples"
|
53
|
+
|
54
|
+
elapsed_time = Time.now - overall_time
|
55
|
+
|
56
|
+
if elapsed_time < BEFORE_WARMUP_TIME
|
57
|
+
warmup_samples.push time
|
58
|
+
|
59
|
+
subprocess.puts "continue"
|
60
|
+
elsif warming_up
|
61
|
+
warmup_samples.push time
|
62
|
+
|
63
|
+
warmup_window.shift if warmup_window.size == WARMUP_WINDOW_SIZE
|
64
|
+
warmup_window.push time
|
65
|
+
window_relative_range = Stats.range(warmup_window) / Stats.mean(warmup_window)
|
66
|
+
|
67
|
+
if warmup_window.size == WARMUP_WINDOW_SIZE && window_relative_range < WARMED_UP_RELATIVE_RANGE
|
68
|
+
warming_up = false
|
69
|
+
warmup_samples = warmup_samples.reverse.drop(WARMUP_WINDOW_SIZE).reverse
|
70
|
+
samples = warmup_window
|
71
|
+
elsif warmup_samples.size > MAX_WARMUP || elapsed_time > MAX_WARMUP_TIME
|
72
|
+
puts "warning: #{@name} #{benchmark} never warmed up!"
|
73
|
+
warming_up = false
|
74
|
+
end
|
75
|
+
|
76
|
+
subprocess.puts "continue"
|
77
|
+
else
|
78
|
+
samples.push time
|
79
|
+
|
80
|
+
if samples.size < SAMPLES_COUNT
|
81
|
+
subprocess.puts "continue"
|
82
|
+
else
|
83
|
+
subprocess.puts "stop"
|
84
|
+
break
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
raise "not enough warmup samples" if warmup_samples.nil?
|
91
|
+
raise "not enough samples" if samples.nil? || samples.size < SAMPLES_COUNT
|
92
|
+
|
93
|
+
Measurement.new(warmup_samples, samples)
|
94
|
+
end
|
95
|
+
|
96
|
+
def to_s
|
97
|
+
@name
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
HARNESS_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
103
|
+
|
104
|
+
class RbenvImplementation < Implementation
|
105
|
+
|
106
|
+
RBENV_ROOT = `rbenv root`.chop
|
107
|
+
|
108
|
+
def initialize(name, version, flags)
|
109
|
+
@name = name
|
110
|
+
@version = version
|
111
|
+
@flags = flags
|
112
|
+
end
|
113
|
+
|
114
|
+
def command(benchmark)
|
115
|
+
"#{RBENV_ROOT}/versions/#{@version}/bin/ruby #{@flags} -I#{HARNESS_DIR} #{benchmark.flags} #{benchmark.file}"
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
class BinaryImplementation < Implementation
|
121
|
+
|
122
|
+
def initialize(name, binary, flags)
|
123
|
+
@name = name
|
124
|
+
@binary = binary
|
125
|
+
@flags = flags
|
126
|
+
end
|
127
|
+
|
128
|
+
def command(benchmark)
|
129
|
+
"#{@binary} #{@flags} -I#{HARNESS_DIR} #{benchmark.flags} #{benchmark.file}"
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
require 'json'
|
10
|
+
|
11
|
+
module Bench
|
12
|
+
|
13
|
+
module JSONFormatter
|
14
|
+
|
15
|
+
def self.format(options, measurements)
|
16
|
+
benchmarks = options.benchmarks
|
17
|
+
implementations = options.implementations
|
18
|
+
|
19
|
+
JSON.pretty_generate({
|
20
|
+
benchmarks: benchmarks,
|
21
|
+
implementations: implementations,
|
22
|
+
measurements: benchmarks.product(implementations).map do |b, i|
|
23
|
+
measurement = measurements[b, i]
|
24
|
+
|
25
|
+
if measurement == :failed
|
26
|
+
{
|
27
|
+
benchmark: b,
|
28
|
+
implementation: i,
|
29
|
+
failed: true
|
30
|
+
}
|
31
|
+
else
|
32
|
+
{
|
33
|
+
benchmark: b,
|
34
|
+
implementation: i,
|
35
|
+
warmup_time: measurement.warmup_time,
|
36
|
+
sample_mean: measurement.sample_mean,
|
37
|
+
sample_error: measurement.sample_error,
|
38
|
+
score: measurement.score,
|
39
|
+
score_error: measurement.score_error,
|
40
|
+
warmup_samples: measurement.warmup_samples,
|
41
|
+
samples: measurement.samples
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
})
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,268 @@
|
|
1
|
+
# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
|
2
|
+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
|
3
|
+
# redistribute it and/or modify it under the terms of the:
|
4
|
+
#
|
5
|
+
# Eclipse Public License version 1.0
|
6
|
+
# GNU General Public License version 2
|
7
|
+
# GNU Lesser General Public License version 2.1
|
8
|
+
|
9
|
+
module Bench
|
10
|
+
|
11
|
+
CONFIG_VERSION = 1
|
12
|
+
|
13
|
+
module Main
|
14
|
+
|
15
|
+
def self.main(args)
|
16
|
+
pre_args = args.dup
|
17
|
+
|
18
|
+
until pre_args.empty?
|
19
|
+
arg = pre_args.shift
|
20
|
+
|
21
|
+
if arg.start_with? "--"
|
22
|
+
case arg
|
23
|
+
when "--env"
|
24
|
+
key = pre_args.shift
|
25
|
+
value = pre_args.shift
|
26
|
+
ENV[key] = value
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
config = Config.new
|
32
|
+
|
33
|
+
# try to find and load default.config.rb file
|
34
|
+
load_configuration_file(config, 'default')
|
35
|
+
|
36
|
+
args = args.dup
|
37
|
+
|
38
|
+
command_name = args.shift
|
39
|
+
|
40
|
+
subjects = []
|
41
|
+
flags = {}
|
42
|
+
|
43
|
+
until args.empty?
|
44
|
+
arg = args.shift
|
45
|
+
|
46
|
+
if arg.start_with? "--"
|
47
|
+
case arg
|
48
|
+
when "--config"
|
49
|
+
load_configuration_file config, args.shift
|
50
|
+
when "--data"
|
51
|
+
flags[arg] = args.shift
|
52
|
+
when "--baseline"
|
53
|
+
flags[arg] = args.shift
|
54
|
+
when "--notes"
|
55
|
+
flags[arg] = args.shift
|
56
|
+
when "--resume"
|
57
|
+
flags[arg] = true
|
58
|
+
when "--show-commands"
|
59
|
+
flags[arg] = true
|
60
|
+
when "--show-samples"
|
61
|
+
flags[arg] = true
|
62
|
+
when "--ignore-excludes"
|
63
|
+
flags[arg] = true
|
64
|
+
when "--value-per-line"
|
65
|
+
flags[arg] = true
|
66
|
+
when "--benchmark-per-line"
|
67
|
+
flags[arg] = true
|
68
|
+
when "--json"
|
69
|
+
flags[arg] = true
|
70
|
+
when "--test-run"
|
71
|
+
flags[arg] = true
|
72
|
+
when "--env"
|
73
|
+
args.shift
|
74
|
+
args.shift
|
75
|
+
else
|
76
|
+
puts "unknown option #{arg}"
|
77
|
+
exit 1
|
78
|
+
end
|
79
|
+
else
|
80
|
+
subjects.push arg
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
implementations = []
|
85
|
+
benchmarks = []
|
86
|
+
|
87
|
+
subjects.each do |s|
|
88
|
+
negated = s.start_with? "^"
|
89
|
+
s = s[1..-1] if negated
|
90
|
+
|
91
|
+
if s == "all"
|
92
|
+
config.benchmarks.values.each do |b|
|
93
|
+
benchmarks.push b
|
94
|
+
end
|
95
|
+
elsif config.implementations.has_key? s
|
96
|
+
i = config.implementations[s]
|
97
|
+
if negated
|
98
|
+
implementations.delete i
|
99
|
+
else
|
100
|
+
implementations.push i
|
101
|
+
end
|
102
|
+
elsif config.implementation_groups.has_key? s
|
103
|
+
ig = config.implementation_groups[s]
|
104
|
+
if negated
|
105
|
+
implementations.delete_if { |i| ig.members.include? i }
|
106
|
+
else
|
107
|
+
implementations.concat ig.members
|
108
|
+
end
|
109
|
+
elsif config.benchmarks.has_key? s
|
110
|
+
b = config.benchmarks[s]
|
111
|
+
if negated
|
112
|
+
benchmarks.delete b
|
113
|
+
else
|
114
|
+
benchmarks.push b
|
115
|
+
end
|
116
|
+
elsif config.benchmark_groups.has_key? s
|
117
|
+
bg = config.benchmark_groups[s]
|
118
|
+
if negated
|
119
|
+
benchmarks.delete_if { |b| bg.members.include? b }
|
120
|
+
else
|
121
|
+
benchmarks.concat bg.members
|
122
|
+
end
|
123
|
+
else
|
124
|
+
puts "unknown implementation or benchmark or group #{s}"
|
125
|
+
exit 1
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
options = Bench::Options.new(
|
130
|
+
config,
|
131
|
+
implementations,
|
132
|
+
benchmarks,
|
133
|
+
flags)
|
134
|
+
|
135
|
+
start = Time.now
|
136
|
+
|
137
|
+
existing_measurements = Measurements.new
|
138
|
+
|
139
|
+
if options.flags.has_key?("--data")
|
140
|
+
if File.exist?(options.flags["--data"])
|
141
|
+
file = File.open(options.flags["--data"], "r")
|
142
|
+
|
143
|
+
if file.gets.strip != "version #{CONFIG_VERSION}"
|
144
|
+
puts "the benchmarks have changed since this file was created"
|
145
|
+
exit 1
|
146
|
+
end
|
147
|
+
|
148
|
+
file.each do |line|
|
149
|
+
measurement = JSON.parse(line)
|
150
|
+
|
151
|
+
if measurement["failed"]
|
152
|
+
measurement_object = :failed
|
153
|
+
else
|
154
|
+
measurement_object = Measurement.new(measurement["warmup_samples"], measurement["samples"])
|
155
|
+
end
|
156
|
+
|
157
|
+
existing_measurements[measurement["benchmark"], measurement["implementation"]] = measurement_object
|
158
|
+
end
|
159
|
+
|
160
|
+
file.close
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
builtin_commands = {
|
165
|
+
"compare" => Commands::Compare,
|
166
|
+
"compare-reference" => Commands::CompareReference,
|
167
|
+
"detail" => Commands::Detail,
|
168
|
+
"list-benchmarks" => Commands::ListBenchmarks,
|
169
|
+
"list-implementations" => Commands::ListImplementations,
|
170
|
+
"reference" => Commands::Reference,
|
171
|
+
"report" => Commands::Report,
|
172
|
+
"remove" => Commands::Remove,
|
173
|
+
"score" => Commands::Score
|
174
|
+
}
|
175
|
+
|
176
|
+
commands = builtin_commands.merge(config.commands)
|
177
|
+
command = commands[command_name]
|
178
|
+
|
179
|
+
if command.nil?
|
180
|
+
puts "unknown command #{command_name}"
|
181
|
+
exit 1
|
182
|
+
end
|
183
|
+
|
184
|
+
command = command.new
|
185
|
+
|
186
|
+
if command.before options, existing_measurements
|
187
|
+
if options.flags.has_key?("--data")
|
188
|
+
file = File.open(options.flags["--data"], "w")
|
189
|
+
file.puts "version #{CONFIG_VERSION}"
|
190
|
+
file.flush
|
191
|
+
|
192
|
+
existing_measurements.measurements.each do |bi, measurement|
|
193
|
+
b, i = bi
|
194
|
+
if measurement == :failed
|
195
|
+
file.puts JSON.generate({ benchmark: b, implementation: i, failed: true })
|
196
|
+
else
|
197
|
+
file.puts JSON.generate({ benchmark: b, implementation: i, warmup_samples: measurement.warmup_samples, samples: measurement.samples })
|
198
|
+
end
|
199
|
+
|
200
|
+
file.flush
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
measurements = Measurements.new
|
205
|
+
|
206
|
+
options.benchmarks.each do |b|
|
207
|
+
options.implementations.each do |i|
|
208
|
+
measurement = existing_measurements[b.name, i.name]
|
209
|
+
|
210
|
+
if measurement.nil?
|
211
|
+
if config.fail_hard_exclusions.include?([i.name, b.name]) && !options.flags["--ignore-excludes"]
|
212
|
+
measurement = :failed
|
213
|
+
else
|
214
|
+
measurement = i.measure(flags, b)
|
215
|
+
end
|
216
|
+
|
217
|
+
unless file.nil?
|
218
|
+
if measurement == :failed
|
219
|
+
file.puts JSON.generate({ benchmark: b, implementation: i, failed: true })
|
220
|
+
else
|
221
|
+
file.puts JSON.generate({ benchmark: b, implementation: i, warmup_samples: measurement.warmup_samples, samples: measurement.samples })
|
222
|
+
end
|
223
|
+
|
224
|
+
file.flush
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
measurements[b, i] = measurement
|
229
|
+
command.result options, b, i, measurement
|
230
|
+
end
|
231
|
+
|
232
|
+
command.benchmark_complete options, b, measurements
|
233
|
+
end
|
234
|
+
|
235
|
+
command.after options, measurements
|
236
|
+
|
237
|
+
unless file.nil?
|
238
|
+
file.close
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
puts "took #{Time.now - start}s"
|
243
|
+
end
|
244
|
+
|
245
|
+
def self.load_configuration_file(config, name, fail_on_missing = true)
|
246
|
+
if name.scan('/').any?
|
247
|
+
config.load File.expand_path(name)
|
248
|
+
else
|
249
|
+
full_name = if name =~ /\.config\.rb$/
|
250
|
+
name
|
251
|
+
else
|
252
|
+
name + '.config.rb'
|
253
|
+
end
|
254
|
+
|
255
|
+
config_files = Dir["{.,bench,benchmark,benchmarks}/#{full_name}"]
|
256
|
+
unless config_files.any?
|
257
|
+
puts "Configuration file #{name} not found."
|
258
|
+
exit 1
|
259
|
+
end
|
260
|
+
config_files.each do |config_file|
|
261
|
+
config.load config_file
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|