summaryrefslogtreecommitdiff
path: root/lodepng_benchmark.cpp
diff options
context:
space:
mode:
authorLode <lvandeve@gmail.com>2017-09-17 12:22:58 +0200
committerLode <lvandeve@gmail.com>2017-09-17 12:22:58 +0200
commit579d38bfd0a3c9fd3a62a9d18560685110161cf8 (patch)
tree149df19eace87cbabdc403a4366b5845fba0f55a /lodepng_benchmark.cpp
parent1d1b55c071591d9537bf5adf67af8d473af6beb8 (diff)
fix encoder memory leak for some input error cases
Diffstat (limited to 'lodepng_benchmark.cpp')
-rw-r--r--lodepng_benchmark.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lodepng_benchmark.cpp b/lodepng_benchmark.cpp
index 791ced0..66de123 100644
--- a/lodepng_benchmark.cpp
+++ b/lodepng_benchmark.cpp
@@ -499,10 +499,10 @@ int main(int argc, char *argv[])
}
}
- std::cout << "Total decoding time: " << total_dec_time/NUM_DECODE << "s" << std::endl;
- std::cout << "Total encoding time: " << total_enc_time << "s" << std::endl;
- std::cout << "Total input size : " << total_in_size << std::endl;
- std::cout << "Total encoded size: " << total_enc_size << std::endl;
+ std::cout << "Total decoding time: " << total_dec_time/NUM_DECODE << "s (" << ((total_in_size/1024.0/1024.0)/(total_dec_time/NUM_DECODE)) << " MB/s)" << std::endl;
+ std::cout << "Total encoding time: " << total_enc_time << "s (" << ((total_in_size/1024.0/1024.0)/(total_enc_time)) << " MB/s)" << std::endl;
+ std::cout << "Total uncompressed size : " << total_in_size << std::endl;
+ std::cout << "Total encoded size: " << total_enc_size << " (" << (100.0 * total_enc_size / total_in_size) << "%)" << std::endl;
if(verbose) std::cout << "benchmark done" << std::endl;
}