【轉】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即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM