cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r642770 - in /incubator/cxf/trunk/benchmark/profiling: build.xml src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java
Date Sun, 30 Mar 2008 16:28:27 GMT
Author: bimargulies
Date: Sun Mar 30 09:28:10 2008
New Revision: 642770

URL: http://svn.apache.org/viewvc?rev=642770&view=rev
Log:
some profiling stuff.

Modified:
    incubator/cxf/trunk/benchmark/profiling/build.xml
    incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java

Modified: incubator/cxf/trunk/benchmark/profiling/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/profiling/build.xml?rev=642770&r1=642769&r2=642770&view=diff
==============================================================================
--- incubator/cxf/trunk/benchmark/profiling/build.xml (original)
+++ incubator/cxf/trunk/benchmark/profiling/build.xml Sun Mar 30 09:28:10 2008
@@ -181,5 +181,18 @@
       <classpath refid="run-classpath"/>
     </java>
   </target>
+  <target name="run-server-endpoint" depends="compile,setNativeLibDir" description="Run
the offline profiling sample">
+
+    <java classname="org.apache.cxf.profile.EndpointCreationLoop3" fork="true">
+      <arg value="10"/>
+      <arg value="ecl3.jps"/>
+      <jvmarg value="-Dcxf.config.file=bloop.xml"/>
+      <jvmarg value="-agentlib:jprofilerti=offline,id=146,config=jprofileConfig.xml"></jvmarg>
+      <jvmarg value="-Xbootclasspath/a:${jprofile.home}/bin/agent.jar"></jvmarg>
+      <env key="LD_LIBRARY_PATH" path="${nativelib.dir}:${nativelib.envvarValue}"/>
+
+      <classpath refid="run-classpath"/>
+    </java>
+  </target>
 
 </project>

Modified: incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java?rev=642770&r1=642769&r2=642770&view=diff
==============================================================================
--- incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java
(original)
+++ incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/EndpointCreationLoop3.java
Sun Mar 30 09:28:10 2008
@@ -19,6 +19,9 @@
 
 package org.apache.cxf.profile;
 
+import java.io.File;
+
+import com.jprofiler.api.agent.Controller;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 
@@ -45,10 +48,22 @@
      * @param args
      */
     public static void main(String[] args) {
+        Controller.stopAllocRecording();
+        Controller.stopCPURecording();
         EndpointCreationLoop3 ecl = new EndpointCreationLoop3();
         int count = Integer.parseInt(args[0]);
+        ecl.iteration();
+        
+        Controller.startCPURecording(true);
+        Controller.startAllocRecording(true);
         for (int x = 0; x < count; x++) {
             ecl.iteration();
         }
+        Controller.stopAllocRecording();
+        Controller.stopCPURecording();
+        if (args.length > 1) {
+            Controller.saveSnapshot(new File(args[1]));
+        }
+        System.exit(0);
     }
 }



Mime
View raw message