directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [30/50] [abbrv] directory-kerby git commit: DIRKRB-383 Clean up benchmark module
Date Thu, 30 Jul 2015 06:24:37 GMT
DIRKRB-383 Clean up benchmark module


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/fc7afce4
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/fc7afce4
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/fc7afce4

Branch: refs/heads/pkinit-support
Commit: fc7afce42b7c74c55512170001e3a248be06aae3
Parents: 3d50f71
Author: drankye <kai.zheng@intel.com>
Authored: Sun Jul 19 06:10:33 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Sun Jul 19 06:10:33 2015 +0800

----------------------------------------------------------------------
 .../kerby/kerberos/benchmark/KrbCodecPerfTest.java    | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/fc7afce4/benchmark/src/test/java/org/apache/kerby/kerberos/benchmark/KrbCodecPerfTest.java
----------------------------------------------------------------------
diff --git a/benchmark/src/test/java/org/apache/kerby/kerberos/benchmark/KrbCodecPerfTest.java
b/benchmark/src/test/java/org/apache/kerby/kerberos/benchmark/KrbCodecPerfTest.java
index cf151dc..9fd34c7 100644
--- a/benchmark/src/test/java/org/apache/kerby/kerberos/benchmark/KrbCodecPerfTest.java
+++ b/benchmark/src/test/java/org/apache/kerby/kerberos/benchmark/KrbCodecPerfTest.java
@@ -19,30 +19,26 @@
  */
 package org.apache.kerby.kerberos.benchmark;
 
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.EncoderException;
 import org.apache.directory.api.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.kerberos.codec.apReq.ApReqContainer;
-import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.spec.ap.ApReq;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
 public class KrbCodecPerfTest {
 
-    public static void main(String[] args) throws KrbException, IOException, DecoderException,
EncoderException {
+    public static void main(String[] args) throws Exception {
         InputStream is = KrbCodecPerfTest.class.getResourceAsStream("/apreq.token");
         byte[] bytes = new byte[is.available()];
         is.read(bytes);
 
         int times = 1000000;
         perfApacheDS(ByteBuffer.wrap(bytes), times);
-        perfHaox(ByteBuffer.wrap(bytes), times);
+        perfKerby(ByteBuffer.wrap(bytes), times);
     }
 
-    private static void perfHaox(ByteBuffer apreqToken, int times) throws KrbException, IOException
{
+    private static void perfKerby(ByteBuffer apreqToken, int times) throws Exception {
         long start = System.currentTimeMillis();
 
         for (int i = 0; i < times; ++i) {
@@ -57,10 +53,10 @@ public class KrbCodecPerfTest {
         }
 
         long end = System.currentTimeMillis();
-        System.out.println("HaoxCodec takes:" + (end - start));
+        System.out.println("KerbyCodec takes:" + (end - start));
     }
 
-    private static void perfApacheDS(ByteBuffer apreqToken, int times) throws EncoderException,
DecoderException {
+    private static void perfApacheDS(ByteBuffer apreqToken, int times) throws Exception {
         long start = System.currentTimeMillis();
 
         for (int i = 0; i < times; ++i) {


Mime
View raw message