- 浏览: 147758 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
liveandevil:
我的一直出现驱动找不到的错误 你那个驱动jar文件时放在哪里 ...
JDBC数据库通用DAO -
zouc816:
hi,wjm901215
我看你这篇文章对mapXtreme ...
用mapXtreme Java开发web gis应用 (下)
Eclipse的TPTP工具使用方法:
<!--++ plugin_code qcomic begin--><!--++ plugin_code qcomic end-->1. TPTP是什么: TPTP是Eclipse的一个顶级工程(Top-Level Project),TPTP项目封装了一大堆公共的操作接口与数据,甚至一个远程执行环境,以供其它的TPTP工具使用。另外,它还提供了扩展点以方便进行定制编码。实际上就是一个依托于Eclipse的JAVA的Profile与分析工具,还提供了整合SWT GUI的Record与Replay功能(另外的文章中进行介绍)。 2.下载要安装的各种plugin。 以TPTP4.1为例 a.解决安装信赖条件: Eclipse SDK 3.1.0 JDK 1.4 EMF SDK 2.1.0 XSD 2.1.0 b.Agent Controller安装 下载 将下载完的安装包解压到想安装的目录。 将<unzip directory>\bin加到系统PATH环境变量中,不能有双引号。 执行<unzip directory>\bin下的SetConfig.bat生成基本配置环境。 执行RAServer.exe,运行守护进程。 c.安装TPTP,此处选择手动安装。 下载TPTP4.1 解压到eclipse\plugins下。 完成安装。 测试。 新建一个工程(Java Project) 将下列类导入到工程中: package com.yadong.testtptp; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class CarModel { /* Required car parts: 1 Engine, 4 wheels, and 2 doors */ public Engine engine = new Engine(); public Wheel[] wheel = new Wheel[4]; public Door left = new Door(), right = new Door(); public CarModel() { for (int i = 0; i < 4; i++) wheel = new Wheel(); } /* Launcher */ public static void main(String[] args) throws IOException { final String LINE_SEPARATOR = System.getProperty("line.separator"); final int BORDER_CHAR_LENGTH = 40; final int UNREF_OBJ_CREATED = 10; StringBuffer menu = new StringBuffer(); CarModel car = new CarModel(); /* Create the menu */ for (int i = 0; i < BORDER_CHAR_LENGTH; i++) menu.append('-'); menu.append(LINE_SEPARATOR).append(" (1) Simulate car usage"); menu.append(LINE_SEPARATOR) .append(" (2) Create unreferenced objects"); menu.append(LINE_SEPARATOR).append(" (q) Quit"); menu.append(LINE_SEPARATOR); for (int i = 0; i < BORDER_CHAR_LENGTH; i++) menu.append('-'); /* Display the menu */ System.out.println("CarModel started" + LINE_SEPARATOR + "Menu:"); System.out.println(menu.toString()); System.out.println("Choose an option:"); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String input = in.readLine().trim(); /* * Accept input for the desired * option */ while (!input.equalsIgnoreCase("q")) { /* Check for invalid entry */ if (input == null || input.length() != 1 || !Character.isDigit(input.charAt(0))) { System.err.println("Wrong option"); input = in.readLine().trim(); continue; } switch (Integer.valueOf(input).intValue()) { case 1: simulateCarUsage(car); break; case 2: for (int i = 0; i < UNREF_OBJ_CREATED; i++) new CarModel(); System.out.println(UNREF_OBJ_CREATED + " unreferenced objects of CarModel has been created"); break; default: System.err.println("Wrong option"); } input = in.readLine().trim(); } } /* Simulates car usage */ public static void simulateCarUsage(CarModel car) { car.left.window.rollup(); car.engine.start(); car.engine.rev(); car.wheel[0].align(); car.engine.stop(); } }/* Inner classes used to model car parts */ class Engine { public void start() { System.out.println("Start the car."); } public void rev() { System.out.println("Rev the engine."); } public void stop() { System.out.println("Car stopped."); } } class Wheel { public void align() { System.out.println("Tires aligned."); } } class Window { public void rollup() { System.out.println("Rollup the window."); } public void rolldown() { System.out.println("Rolldown the window."); } } class Door { public Window window = new Window(); public void open() { System.out.println("Open()"); } public void close() { System.out.println("Close()"); } } 右键点击CarModel.java,这时会在弹出菜单中显示出Profile As ->Java Application 运行. 同时切换视图到”Profiling and logging”,这样就可以得到正在运行中程序的Profile 在这个视图中如果设置得当的话可以查看到如下结果: 1. Coverage 2. Execution flow 3. Memory 4. Object Reference 5. UML2 object/class/Thread Interaction 下载地址: Eclipse SDK 3.1.0(Win32): www.eclipse.com/downloads/index.php JDK 1.4(Win32): java.sun.com EMF SDK 2.1.0(Win32): www.eclipse.com/downloads/index.php XSD 2.1.0(Win32):http://download.eclipse.org/tools/emf/downloads/drops/2.1.0/R200507070200/xsd-SDK-2.1.0.zip:TPTP(Win32) http://download.eclipse.org/tptp/4.1.0/TPTP-4.1.0-200511150100/tptp.runtime-TPTP-4.1.0-200511150100.zip Agent Controller(Win32):http://download.eclipse.org/tptp/4.1.0/TPTP-4.1.0-200511150100/tptpdc.win_ia32-TPTP-4.1.0-200511150100.zip |
发表评论
-
JAX-WS一个很简单的RPC风格的Web Service同步调用
2013-01-10 17:13 892Web Service技术,无疑会越来越被广泛应用的,可 ... -
JAX-WS集成Web工程的Web Service的创建和发布简单入门(1)
2013-01-10 17:10 978首先, 为了我们这个WS的实验能够顺利的完成,最好能到官 ... -
C3P0连接池配置
2012-11-08 10:07 848<c3p0-config> <defau ... -
Http学习之使用HttpURLConnection发送post和get请求 .
2012-10-29 15:40 1017最常用的Http请求无非是get和post,get请求可以获取 ... -
WebServices实例
2012-09-06 16:58 555http://www.cnblogs.com/mingzi/a ... -
博客文章
2012-08-23 14:13 0http://caoweiblog.sinaapp.com/ -
80端口被占用
2012-08-09 10:53 707netstat -aon|findstr "80&q ... -
ANT build.xml文件详解
2012-07-26 16:29 823Ant的优点 跨平台性。Ant是用Java语言编写的 ... -
关于C3P0超过最大连接数问题
2012-07-02 10:27 1097package com.innotek; import ... -
设置Eclipse背景色
2012-06-21 15:33 791(Window)-->(Preferences)--&g ... -
JSTL之formatNumber取整 .
2012-03-16 23:16 1712在网上查了许多资料都说EL表达式无法取整,的确EL表达式除法结 ... -
Apache APMServ 80端口被占用的最全面的解决方法
2011-12-14 13:35 354711小时前 在使用WampServer成功架设起Apache ... -
Eclipse中添加MyEclipse插件
2011-12-14 11:31 715众所周知eclipse是一个很强大的java IDE,而且它免 ... -
千万数量级分页存储过程,可支持多表查询,任意排序
2011-12-12 11:15 1177从程序中考虑:比如用 ... -
java技术大全网址
2011-11-28 14:20 690http://www.open-open.com/ -
TPTP教程
2011-10-09 11:04 1080Eclipse Test and Performance To ... -
JExcelAPI修改Excel的实例
2011-09-09 14:33 846package com.jExcelApi.test; ... -
Java Excel API 使用方法(2)
2011-09-09 09:48 707Workbook类提供的方法 1. int getNumbe ... -
EL表达式取整或者取固定位小数 目前最好的方法
2011-07-28 10:37 884在网上查了许多资料都说EL表达式无法取整,的确EL表 ... -
java读取网络上的图片并保存到本地,图片文件名不变
2011-07-05 14:34 3324import java.io.DataInputStream; ...
相关推荐
eclipse tptp THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE ...
Eclipse TPTP平台配置详细步骤Ver1.0.doc
如何利用TPTP进行性能监视
Eclipse Test & Performance Tools Platform Project TPTP平台搭建详细步骤与截图,以及注意事项。 原创:http://hi.baidu.com/qqwwwgame
基于eclipse下开源自动化测试工具tptp的详细教程
什么是tptpEclipseTestandPerformanceToolsPlatform(TPTP)用它可以监测运行的并发线程数据、内存的使用情况等,是不款非常不错的性能测试工具,它是eclipse官方的一款插件项目.可以进行程序执行时间的统计分析、...
学习如何使用 Eclipse Test and Performance Tools Platform(TPTP)分析 Java™ 应用程序,并研究如何测量内存使用量、识别内存泄漏并隔离性能瓶颈。
Eclipse(中文语言包下载地址)Indigo,Helios,Galileo,Ganymede,Europa EclipseJSFMyeclipseLinux Babel Language Packs for Europa 3.3 (MyEclipse 6.5) • BabelLanguagePack-birt-zh_3.3.1.v20101211042632.zip...
在您的Web应用程序的不同版本之间自动测试HTML页面的内容。 断言:文本,正则表达式,XPath和业务属性(名称-值属性)。 根据记录自动生成断言。 Eclipse插件。
Eclipse安装TPTP插件时会用到的emf-sdo-xsd-SDK-2.3.2.zip文件
Callisto包括一个功能强大的分析工具,此工具称为Eclipse测试与性能工具平台,简称TPTP。TPTP提供了一套功能全面的开源性能-测试和分析工具,包括集成的应用程序监控、测试、跟踪和分析功能,以及静态代码分析工具。...