您的位置:软件测试 > 开源软件测试 > 开源性能测试工具 > TPTP接口
eclipse java性能分析工具tptp应用
作者:网络转载 发布时间:[ 2013/12/20 9:41:21 ] 推荐标签:

1.  参考

http://www.eclipseworld.org/bbs/read.php?tid=3111&page=e
 
2.  下载

http://www.eclipse.org/downloads/index_project.php

eclipse-SDK-3.2M6-win32.zip(http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.2-200606291905/eclipse-SDK-3.2-win32.zip)

      xsd-runtime-2.2.0.zip

      emf-sdo-runtime-2.2.0.zip

      uml2-M200607270400.zip

      tptp.runtime-TPTP-4.2.0.1.zip   runtime lib(http://www.eclipse.org/downloads/download.php?file=/tptp/4.2.0.2/TPTP-4.2.0.2-200608021100/tptp.runtime-TPTP-4.2.0.2.zip)

 tptpdc.win_ia32-TPTP-4.0.1-200510031151.zip  Agent controller(http://www.eclipse.org/downloads/download.php?file=/tptp/4.2.0.2/TPTP-4.2.0.2-200608021100/agntctrl.win_ia32-TPTP-4.2.0.2.zip)
3.  安装

   先安装好jdk1.5,eclipse。并且配置好JAVA_HOME,CLASSPATH=rt.jar。

      再解压缩

xsd-runtime-2.2.0.zip

      emf-sdo-runtime-2.2.0.zip

      uml2-M200607270400.zip

      tptp.runtime-TPTP-4.2.0.1.zip到eclipse目录。关键是子目录与eclipse目录一致!

      解压tptpdc.win_ia32-TPTP-4.0.1-200510031151.zip到D: ptpdc.win_ia32-TPTP-4.0.1。

inSetConfig.bat生成configserviceconfig.xml文件。

<?xml version="1.0" encoding="UTF-8"?>

<AgentControllerConfiguration activeConfiguration="default" filePort="10005" isDataMultiplexed="false" jvm="D:SunAppServerjdkjreinserverjvm.dll" loggingDetail="LOW" loggingLevel="INFORMATION" port="10002" processPolling="true" securedPort="10003" version="4.0.0">

   <AgentControllerEnvironment configuration="default">

          <Variable name="JAVA_PATH" position="replace" value="d:sunappserverjdkjreinjava.exe"/>

          <Variable name="RASERVER_HOME" position="replace" value="D: ptpdc.win_ia32-TPTP-4.0.1"/>

          <Variable name="PLUGINS_HOME" position="replace" value="%RASERVER_HOME%plugins"/>

          <Variable name="PATH" position="prepend" value="%RASERVER_HOME%in"/>

          <Variable name="SYS_TEMP_DIR" position="replace" value="C:DOCUME~1JIANZH~1.LIALOCALS~1Temp"/>

          <Variable name="LOCAL_AGENT_TEMP_DIR" position="replace" value="%SYS_TEMP_DIR%"/>

          <Variable name="CLASSPATH_ORG_APACHE_JAKARTA_COMMONS_LOGGING" position="append" value="%PLUGINS_HOME%org.apache.jakarta_commons_logging_1.0.3commons-logging.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_CORE_RUNTIME" position="append" value="%PLUGINS_HOME%org.eclipse.core.runtime_3.1.1.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_EMF_COMMON" position="append" value="%PLUGINS_HOME%org.eclipse.emf.common_2.1.0.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_EMF_ECORE" position="append" value="%PLUGINS_HOME%org.eclipse.emf.ecore_2.1.0.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_EMF_ECORE_XMI" position="append" value="%PLUGINS_HOME%org.eclipse.emf.ecore.xmi_2.1.0.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS" position="append" value="%PLUGINS_HOME%org.eclipse.tptp.platform.models_4.0.0 ptp-models.jar"/>

          <Variable name="CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS" position="append" value="%PLUGINS_HOME%org.eclipse.tptp.platform.models.nl1_4.0.0org.eclipse.tptp.platform.models.nl1.jar"/>

          <Variable name="CLASSPATH_ORG_JUNIT" position="append" value="%PLUGINS_HOME%org.junit_3.8.1junit.jar"/>

          <Variable name="CLASSPATH" position="append" value="%CLASSPATH_ORG_ECLIPSE_CORE_RUNTIME%"/>

   </AgentControllerEnvironment>

   <Application configuration="default" executable="java.exe" location="%SYS_TEMP_DIR%" path="%JAVA_PATH%"/>

   <Hosts configuration="default">

          <Allow host="LOCAL"/>

   </Hosts>

   <Plugin path="%PLUGINS_HOME%"/>

</AgentControllerConfiguration>

环境变量:RASERVER_HOME=D: ptpdc.win_ia32-TPTP-4.0.1。另外,环境变量path加入d: ptpdc.win_ia32-tptp-4.0.1in。

点击RAServer.exe启动。
4.  监控java应用

5.  监控tomcat应用

下载apache-tomcat-5.5.17

http://tomcat.apache.org/download-55.cgi#5.5.17点击Windows Executable

修改catalina.bat,java参数加入-XrunpiAgent:server=enabled

if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity

echo "not securiyt"

%_EXECJAVA%-XrunpiAgent:server=enabled%JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

激活startup.bat

Elipse建立profile

加入agent.

加入monitor

点击profile.

点击start monitoring !

浏览器ie:

http://localhost:8080/servlets-examples/servlet/RequestParamExample发起请求

然后右键点击pause monitoring暂停。而disattach from agent则强行停止tomcat服务。

然后双击内存,时间,代码覆盖

软件测试工具 | 联系我们 | 投诉建议 | 诚聘英才 | 申请使用列表 | 网站地图
沪ICP备07036474 2003-2017 版权所有 上海泽众软件科技有限公司 Shanghai ZeZhong Software Co.,Ltd