Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 84914 invoked from network); 18 Jul 2008 18:47:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 18:47:02 -0000 Received: (qmail 38554 invoked by uid 500); 18 Jul 2008 18:47:02 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 38516 invoked by uid 500); 18 Jul 2008 18:47:02 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 38507 invoked by uid 99); 18 Jul 2008 18:47:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 11:47:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 18:46:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 65F4423889FE; Fri, 18 Jul 2008 11:46:41 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r677996 - in /cxf/trunk/benchmark/performance: base/src/org/apache/cxf/pat/internal/TestCaseBase.java soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java Date: Fri, 18 Jul 2008 18:46:41 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080718184641.65F4423889FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Jul 18 11:46:40 2008 New Revision: 677996 URL: http://svn.apache.org/viewvc?rev=677996&view=rev Log: Minor updates to the perf thing to be what I was testing with the chunking stuff Modified: cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java cxf/trunk/benchmark/performance/soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java Modified: cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java URL: http://svn.apache.org/viewvc/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java?rev=677996&r1=677995&r2=677996&view=diff ============================================================================== --- cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java (original) +++ cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java Fri Jul 18 11:46:40 2008 @@ -183,19 +183,26 @@ return; } - System.out.println("TestCase " + name + " is warming up the jit. (20 sec/1200 iterations)"); - final long endTime = System.currentTimeMillis() + 20000; + final int threadCount = 4; + final long timeLimit = 30; + final int countLimit = 1200; + + System.out.println("TestCase " + name + " is warming up the jit. (" + timeLimit + " sec/" + countLimit + " iterations, " + threadCount + " threads)"); + final long startTime = System.currentTimeMillis(); + final long endTime = startTime + (timeLimit * 1000l); final T t = getPort(); - for (int x = 0; x < 12; x++) { + for (int x = 0; x < (threadCount - 1); x++) { new Thread() { public void run() { try { int count = 0; - while (count < 1200 || System.currentTimeMillis() < endTime) { + while (count < countLimit || System.currentTimeMillis() < endTime) { count++; doJob(t); } + //System.out.println(count); + //System.out.println("" + (System.currentTimeMillis() - startTime)); } catch ( Exception ex ) { ex.printStackTrace(); } @@ -205,12 +212,15 @@ } int count = 0; - while (count < 1200 || System.currentTimeMillis() < endTime) { + while (count < countLimit || System.currentTimeMillis() < endTime) { count++; doJob(t); } - while (initDone != 12) { - Thread.sleep(100); + //System.out.println(count); + //System.out.println("" + (System.currentTimeMillis() - startTime)); + ++initDone; + while (initDone != threadCount) { + Thread.sleep(100); } } catch (Exception e) { e.printStackTrace(); Modified: cxf/trunk/benchmark/performance/soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java URL: http://svn.apache.org/viewvc/cxf/trunk/benchmark/performance/soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java?rev=677996&r1=677995&r2=677996&view=diff ============================================================================== --- cxf/trunk/benchmark/performance/soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java (original) +++ cxf/trunk/benchmark/performance/soap_http_doc_lit/src/org/apache/cxf/performance/complex_type/client/Client.java Fri Jul 18 11:46:40 2008 @@ -184,11 +184,9 @@ } complexType.setVarEnum(ColourEnum.RED); - byte[] binary = new byte[256 * packetSize]; - for (int idx = 0; idx < 1 * packetSize; idx++) { - for (int jdx = 0; jdx < 256; jdx++) { - binary[idx * 256 + jdx] = (byte)(jdx - 128); - } + byte[] binary = new byte[256]; + for (int jdx = 0; jdx < 256; jdx++) { + binary[jdx] = (byte)(jdx - 128); } complexType.setVarHexBinary(binary); complexType.setVarBase64Binary(binary); @@ -196,24 +194,25 @@ } public void initTestData() { - //for (int i = 0; i < packetSize; i++) { NestedComplexType ct = createComplexType(); - for (int i = 0; i < 1; i++) { + for (int i = 0; i < packetSize; i++) { complexTypeSeq.getItem().add(ct); } // init String and Binary String temp = "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+?><[]/0123456789"; - inputBase64 = new byte[1024 * packetSize]; - for (int idx = 0; idx < 4 * packetSize; idx++) { + inputBase64 = new byte[1024]; + for (int idx = 0; idx < 4; idx++) { for (int jdx = 0; jdx < 256; jdx++) { inputBase64[idx * 256 + jdx] = (byte)(jdx - 128); } } + StringBuilder builder = new StringBuilder(packetSize * 1024); + builder.append(inputString); for (int i = 0; i < asciiCount / temp.length() * packetSize; i++) { - inputString = inputString + temp; + builder.append(temp); } - + inputString = builder.toString(); } public void doJob(DocPortType port) {