JAVA 性能监视 JAMON can be with SpringWeb or jwebap
来源:互联网 发布:网络布控中心 编辑:程序博客网 时间:2024/05/11 16:36
http://www.infoq.com/cn/articles/java-profiling-with-open-source
E:\>jps4344 bootstrap --> tomcatG:\paul>jmap -histo:live 4344 > G:\jmap.txt
num #instances #bytes class name---------------------------------------------- 1: 20153 3273216 [C 2: 21429 2548128 <constMethodKlass> 3: 32644 2060096 <symbolKlass> 4: 21429 1716016 <methodKlass> 5: 2301 1188528 <constantPoolKlass> 6: 5990 988904 [B 7: 2301 944304 <instanceKlassKlass> 8: 1996 698608 <constantPoolCacheKlass> 9: 21322 511728 java.lang.String 10: 3717 297360 java.lang.reflect.Method 11: 11233 269592 java.util.HashMap$Entry 12: 2547 244512 java.lang.Class 13: 3406 191312 [S 14: 1269 183040 [Ljava.util.HashMap$Entry;
The Java Application Monitor (JAMon) is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications. 1) It contains the ability to monitor JDBC/SQL, web page requests, ejb's, log4j, interfaces and more. 2) It tracks aggregate stats for each sql statement, page request etc. and also lets you look at this information and more via the JAMon war. 3) You can also access JAMon statistics via the api
http://mvnrepository.com/artifact/com.jamonapi/jamon/2.75
优化程序之前,可用Jamon来监测你的Spring应用
http://www.iteye.com/topic/112172
用jamon来监控你的sql执行效率
http://www.iteye.com/topic/164758
from he:http://leadyu.iteye.com/
看了下jamon,应该说jwebap在部署方面真的简单太多了。
首先,jwebap对于jdbc的监控,根本不需要代理数据源,也不需要实现特定的代理驱动。而且jamon这种方式应该是没法监控jndi数据源的(从我初步从它的配置文档了解到的,我只能说应该:-) )
另外,对于EJB的监控,Jwebap也根本不需要配EJB的代理,只要在method plugin的'detect-class'参数里,配置想监控的包名即可,如"test.ejb.*;com.ejb.*;"
jwebap的部署,只需要丢个jar包,配下jwebap.xml 和对应的web.xml即可。
我觉得可以这么归结:
第一代prfiling tools:基于代理,代理,又代理的思想,实现monitor。缺点是,部署麻烦,甚至是还需要修改项目代码才能部署,功能也不强。比如jamon和P6SQL
第二代prfiling tools:基于专属平台JVMPI,缺点:给系统带来了10-20倍的性能负担,同时部署复杂,但是,功能强大,如jprofiler
第三代prfiling tools:出现了BCEL,后更有ASM等字解码指令操作框架,介于jdk14-15之间。基于字解码操作,profiling实现了真正意义的动态monitor。这种profiling部署简单,性能高,但是功能不算非常强大。
第四代prfiling tools:出现jdk instrument。更有aspectJ。这时profiling功能得到增强,但是丢失了大量停留在jdk14的用户,同时部署也不简单。
Jwebap从这种划分,应该说,处于第三代和第四代之间,Jwebap-core采用第三代技术,plugin则很任意,介于第四代技术。
with spring:
http://cpjsjxy.iteye.com/blog/1612317
开始改造 jwebap 持久化其监控数据,及其分页:
debug追踪至:
org.jwebap.plugin.tracer.http.HttpRequestTrace
\org\jwebap\plugin\tracer\util\TimeFilterViewHelper.java
用log4j记录jwebap的trace轨迹数据:
修改:org\jwebap\plugin\tracer\TimeFilterAnalyser.java -->方法: inactiveProcess(Trace trace)
导出轨迹数据后其为html格式,可修改以下 formatter:
HttpRequestTrace
SQLConvertor
- JAVA 性能监视 JAMON can be with SpringWeb or jwebap
- android R.java居然报错,Underscores can only be used with source level 1.7 or greater
- Java性能监控 Jwebap 监控数据存储 二次开发
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- A TextureView or a subclass can only be used with hardware acceleration enabled.错误原因分析
- Delegation Token can be issued only with kerberos or web authentication
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- Jamon
- HashMap can be replaced with SparseArray--Android应用性能优化之使用SparseArray替代HashMap
- -pie can only be used when targeting iOS 4.2 or laterclang: error: linker command failed with exit c
- ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with e
- ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with e
- 数据库建表 there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- Hololens错误提示:can't be loaded because it was not built with the right version or build target.
- 学习使用Jwebap来监测程序性能
- java.lang.IllegalStateException: ActionBarContextView can only be used with android:layout_width="
- java.lang.IllegalStateException: ActionBarImpl can only be used with a compatible window decor layou
- java.lang.IllegalStateException: ActionBarImpl can only be used with a compatible window decor layou
- 设计模式之工厂方法模式
- android中创建项目各选项的意思
- 做一个心如止水的程序员
- link error 2019---外部符号无法解析的原因及解决方案
- 群里大牛聊天记录摘要
- JAVA 性能监视 JAMON can be with SpringWeb or jwebap
- Android编程心得---ViewPager+Fragment篇(一)初始化ViewPager的一些问题
- 触动心灵的经典句子
- 【resin】 resin3 线程池与IO模型(1)
- 美澳搜寻失联客机无果 残骸又是一场乌龙?
- 12岁的少年教你用Python做小游戏
- 用cocos2d3.0写一个srpg游戏-开篇
- GPIO读写
- 循环使用正则导致进程挂起和CPU使用率达到100%居高不下测试Demo