directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Fixed an error in the benchmark test
Date Mon, 20 Jul 2015 05:30:56 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 32c3275d6 -> dece3b71f


Fixed an error in the benchmark test


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

Branch: refs/heads/master
Commit: dece3b71f5bc8c6be285f9faad0e7b6b8a201055
Parents: 32c3275
Author: drankye <kai.zheng@intel.com>
Authored: Mon Jul 20 13:15:46 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Mon Jul 20 13:15:46 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/dece3b71/benchmark/src/main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java
----------------------------------------------------------------------
diff --git a/benchmark/src/main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java b/benchmark/src/main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java
index 25804dc..4d1decd 100644
--- a/benchmark/src/main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java
+++ b/benchmark/src/main/java/org/apache/kerby/benchmark/KrbCodecBenchmark.java
@@ -63,9 +63,10 @@ public class KrbCodecBenchmark {
     @Benchmark
     @Fork(2)
     public void decodeWithApacheDS() throws Exception {
+        ByteBuffer content = apreqToken.duplicate();
         Asn1Decoder krbDecoder = new Asn1Decoder();
-        ApReqContainer apreqContainer = new ApReqContainer(apreqToken.duplicate());
-        krbDecoder.decode(apreqToken, apreqContainer);
+        ApReqContainer apreqContainer = new ApReqContainer(content);
+        krbDecoder.decode(content, apreqContainer);
         String serverName = apreqContainer.getApReq().getTicket().getSName().toString();
         if (serverName == null) {
             throw new RuntimeException("Decoding test failed");


Mime
View raw message