【转】Spring Insight 使用介绍

Spring Insight看起来是个不错的东东,可以可视化的看整个请求的各个过程所花费的时间,主要是包括后台花费的时间。它好像是Spring和google合作的产品。值得拥有!!!

以下内容转自:http://jerryzl.iteye.com/blog/679794

Spring Insight可以以可视化的方式查看应用程序运行时的性能和行为。 
    * See the SQL executed for any page request 
    * Find pages which are executing slowly and drill into the cause 
    * Verify your application's transactions are working as designed 
首先去官方网站http://www.springsource.org/insight下载springsource-tc-server-developer-2.0.1.RELEASE(1).zip也可下载SpringSource Tool Suite (STS)结合eclipse使用。 
1.解压缩springsource-tc-server-developer-2.0.1.RELEASE(1).zip 
2.进入目录运行D:\TDDOWNLOAD\springsource-tc-server-developer\spring-insight-instance\bin>tcrun 
time-ctl.bat install spring-insight-instance(我的解压缩目录是D:\TDDOWNLOAD\) 
表示安装服务,没安装服务dos命令行也会有提示信息, 
spring-insight-instance是解压缩文件夹后自带的实例,也可自己利用命令创建自己的实例,可参考官方文档查看,地址为:http://static.springsource.com/projects/tc-server/2.0/devedition/htmlsingle/devedition.html 
3.如果需要修改增加jvm栈内存等,在D:\TDDOWNLOAD\springsource-tc-server-developer\spring-insight-instance\conf下的wrapper.conf文件中修改。 
wrapper.java.additional.8=-Xms256m -Xmx1024m -XX:MaxPermSize=128m 
4.不支持IE6 
5.将web工程发布到D:\TDDOWNLOAD\springsource-tc-server-developer\spring-insight-instance\webapps下, 
6.启动服务 

D:\TDDOWNLOAD\springsource-tc-server-developer\spring-insight-instance\bin> 
tcruntime-ctl.bat start spring-insight-instance 
等待一会。。。。。。。。 
访问http://127.0.0.1:8080/insight/traces即可查看发布的web工程的响应信息。 
稽核google的Speed Tracer查看时,可看到吞吐量和错误率的指标,具体需要安装google浏览器,然后安装Speed Tracer扩展。下载地址为: 
http://code.google.com/intl/zh-CN/webtoolkit/speedtracer/ 
安装完成后在google浏览器快捷方式中加入启动参数:"xxx\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --enable-extension-timeline-api,然后重启google浏览器,访问http://127.0.0.1:8080/insight/traces,点击monitor tab即可在Speed Tracer中查看信息。 
7.停止服务时将start替换为stop即可。

posted on 2013-04-26 16:19  yoyo002  阅读(2888)  评论(1编辑  收藏  举报