From d772f9ac4593ac5536daf94156b6049a3937d8e9 Mon Sep 17 00:00:00 2001 From: DRC Date: Fri, 14 Mar 2014 04:32:03 +0000 Subject: [PATCH] Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1167 632fc199-4ca6-4c93-a231-07263d6284db --- java/TJUnitTest.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/java/TJUnitTest.java b/java/TJUnitTest.java index 3941440..f7eef66 100644 --- a/java/TJUnitTest.java +++ b/java/TJUnitTest.java @@ -152,10 +152,6 @@ public class TJUnitTest { return "Unknown"; } - private static double getTime() { - return (double)System.nanoTime() / 1.0e9; - } - private static void initBuf(byte[] buf, int w, int pitch, int h, int pf, int flags) throws Exception { int roffset = TJ.getRedOffset(pf); @@ -697,7 +693,6 @@ public class TJUnitTest { String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-Up" : "Top-Down "; String buStr = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD"; - double t; int size = 0, ps, imgType = pf; if (yuv == YUVDECODE) { @@ -738,7 +733,6 @@ public class TJUnitTest { } Arrays.fill(dstBuf, (byte)0); - t = getTime(); tjc.setSubsamp(subsamp); tjc.setJPEGQuality(jpegQual); tjc.setYUVPad(pad); @@ -758,7 +752,6 @@ public class TJUnitTest { tjc.compress(dstBuf, flags); } size = tjc.getCompressedSize(); - t = getTime() - t; if (yuv == YUVENCODE) tempstr = baseName + "_enc_" + pfStr + "_" + buStr + "_" + @@ -778,8 +771,7 @@ public class TJUnitTest { } } else System.out.print("Done."); - System.out.format(" %.6f ms\n", t * 1000.); - System.out.println(" Result in " + tempstr); + System.out.println("\n Result in " + tempstr); return size; } @@ -789,7 +781,6 @@ public class TJUnitTest { String baseName, int subsamp, int flags, TJScalingFactor sf) throws Exception { String pfStr, tempstr; - double t; int scaledWidth = sf.getScaled(w); int scaledHeight = sf.getScaled(h); int temp1, temp2, imgType = pf; @@ -821,7 +812,6 @@ public class TJUnitTest { else System.out.print("... "); - t = getTime(); tjd.setJPEGImage(jpegBuf, jpegSize); if (tjd.getWidth() != w || tjd.getHeight() != h || tjd.getSubsamp() != subsamp) @@ -842,7 +832,6 @@ public class TJUnitTest { else dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags); } - t = getTime() - t; if (bi) { tempstr = baseName + "_dec_" + pfStr + "_" + @@ -871,7 +860,7 @@ public class TJUnitTest { exitStatus = -1; } } - System.out.format(" %.6f ms\n", t * 1000.); + System.out.print("\n"); } private static void decompTest(TJDecompressor tjd, byte[] jpegBuf, -- 2.40.0