环境
JProfiler 17.1.3(IDEA插件)
JProfiler 9.2(可执行软件)
IntelliJ IDEA 2017.2.5
下载
下载JProfiler(IDEA)插件
方式1: 
在IDEA上直接下载Settings–plugins–Browse repositories

搜索JProfiler 点击 install 按钮安装,然后从启IDEA工具 
 
看到如下图片则说明安装完成

方式2: 
官网下载插件,手动安装 
在首页向下翻,中部位置能看到JProfiler最新版本,包括历史版本下载链接,本教程中我们选择17.1.3版本。点击DOWNLOAD进行下载。 
JProfiler官方下载地址

把从下载的压缩包解压出来的JProfiler文件夹,copy到IDEA自定义插件目录,默认路径:C:\Users\Administrator.IntelliJIdea2017.2\config\plugins 
从启IDEA看到如下图标则安装成功:

注:关于IDEA的使用可以看教程IntelliJ IDEA 使用初、中、高级详细教程

安装
安装JProfiler监控软件
官方下载地址 
右上角可以选择要下载版本 
 
注: 本教程选择的版本是9.2

下载完双击运行,选择自定义目录安装,点击Next

选择安装路径,建议选择一个文件名中没有中文,没有空格的路径因为如果改手动启动时,空格识别不了。然后一直点Next

配置
配置IDEA运行环境
Settings–Tools–JProflier–JProflier executable选择JProfile安装可执行文件。(如果系统只装了一个版本,启动IDEA时会默认选择)保存

选择你要分析的项目,点击JProfiler图标启动。

启动完成会自动弹出JProfiler窗口,在里面就可以监控自己的代码性能了。

至此IDEA中配置JProfiler做性能分析就完成了!

扩展
配置JRebel和JProfiler同时运行
有些人在IDEA中配置了JRebel热部署,要想JRebel和JProfiler同时运行,就要改手动管理JProfiler session了。

方式1: 
通过点击tomcat的启动脚本启动 
在要分析的tomcat启动脚本catalina.bat中增加一行。

set CATALINA_OPTS=-agentpath:D:\service\jprofiler9\bin\windows-x64\jprofilerti.dll=port=8849,nowait,id=80,config=C:\Users\Administrator\.jprofiler9\config.xml %CATALINA_OPTS%

方式2: 
通过Idea JRebel 启动 
在IDEA Run/Debug Configurations窗口JRebel Debug中配置Environment Variables属性。

CATALINA_OPTS=-agentpath:D:\service\jprofiler9\bin\windows-x64\jprofilerti.dll\=port\=8849,nowait,id\=81,config\=C:\Users\Administrator\.jprofiler9\config.xml

启动JRebel

看到控制台如下信息,说明JRebel和JProfiler都启动了。

JProfiler> Protocol version 55
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> Don't wait for frontend to connect.
JProfiler> 64-bit library
JProfiler> Using config file C:\Users\Administrator\.jprofiler9\config.xml (id: 80)
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
2018-02-05 17:55:02 JRebel:
2018-02-05 17:55:02 JRebel: A newer version '7.1.5' is available for download
2018-02-05 17:55:02 JRebel: from http://zeroturnaround.com/software/jrebel/download/
2018-02-05 17:55:02 JRebel:
Connected to the target VM, address: '127.0.0.1:61805', transport: 'socket'
JProfiler> VM initialized
2018-02-05 17:55:02 JRebel: Contacting myJRebel server ..
JProfiler> Using dynamic instrumentation
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.64
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Aug 19 2015 17:18:06 UTC
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.64.0
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             D:\service\Java\jdk1.8.0_101\jre
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_101-b13
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_Service-ALL_7
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\service\tomcat\Service-tomcat-7.0.64
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.base=C:\Users\Administrator\.jrebel
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.env.ide.plugin.version=7.1.4
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.env.ide.version=2017.2.5
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.env.ide.product=IU
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.env.ide=intellij
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Drebel.notification.url=http://localhost:17434
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentpath:C:\Users\Administrator\.IntelliJIdea2017.2\config\plugins\jr-ide-idea\lib\jrebel6\lib\jrebel64.dll
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61805,suspend=y,server=n
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_Service-ALL_7\conf\logging.properties
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentpath:D:\service\jprofiler9\bin\windows-x64\jprofilerti.dll=port=8849,nowait,id=80,config=C:\Users\Administrator\.jprofiler9\config.xml
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\service\tomcat\Service-tomcat-7.0.64\endorsed
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_Service-ALL_7
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\service\tomcat\Service-tomcat-7.0.64
二月 05, 2018 5:55:04 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=D:\service\tomcat\Service-tomcat-7.0.64\temp
二月 05, 2018 5:55:04 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
二月 05, 2018 5:55:04 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2018-02-05 17:55:06 JRebel:  Starting logging to file: C:\Users\Administrator\.jrebel\jrebel.log
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:  #############################################################
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:  JRebel Agent 7.1.4 (201712200830)
2018-02-05 17:55:06 JRebel:  (c) Copyright ZeroTurnaround AS, Estonia, Tartu.
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:  Over the last 16 days JRebel prevented
2018-02-05 17:55:06 JRebel:  at least 117 redeploys/restarts saving you about 0 hours.
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:  Licensed to wenyuan hou (using myJRebel).
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:
2018-02-05 17:55:06 JRebel:  #############################################################
2018-02-05 17:55:06 JRebel:

点击jprofiler.exe 
执行菜单Session–Integr ation Wizards–New Server Integration 
 
选择tomcat容器版本(7.X) 
 
选择是本地测试还是远程测试(本处选本地) 
 
选择虚拟机的类型 
 
选择Web容器是否和Jprofiler一起运行(我们使用JRebel启动,所以选择第二个) 
 
选择tomcat启动脚本 
 
选择端口号默认就行

然后一直Next,最后成功。

完成!

Intellij IDEA集成JProfiler性能分析神器相关推荐

  1. idea 查看jsp是否被引用_IDEA集成Java性能分析神器JProfiler

    阅读文本大概需要10分钟. <eclipse集成Java性能分析神器JProfiler>讲解了eclipse集成Jprofiler,这篇讲解一下IDEA如何集成JProfiler. 1.在 ...

  2. java visualvm 教程_Java性能分析神器--VisualVM Launcher[1]

    Java性能分析神器1--VisualVM Launcher VisualVM 当你日复一日敲代码的时候,当你把各种各样的框架集成到一起的时候,看着大功告成成功运行的日志,有没有那么一丝丝迷茫和惆怅: ...

  3. explain ref_MySQL 性能分析神器 —— EXPLAIN 用法与解读。

    ↑ 点击上面 "时代Java"关注我们,关注新技术,学习新知识! EXPLAIN作为MySQL的性能分析神器,读懂其结果是很有必要的,然而我在各种搜索引擎上竟然找不到特别完整的解读 ...

  4. Java性能分析神器-JProfiler详解(一)

    前段时间在给公司项目做性能分析,从简单的分析Log(GC log, postgrep log, hibernate statitistic),到通过AOP搜集软件运行数据,再到PET测试,感觉时间花了 ...

  5. 性能分析神器VisualVM

    VisualVM 是一款免费的,集成了多个 JDK 命令行工具的可视化工具,它能为您提供强大的分析能力,对 Java 应用程序做性能分析和调优.这些功能包括生成和分析海量数据.跟踪内存泄漏.监控垃圾回 ...

  6. chrome://tracing 性能分析神器

    在Soc性能分析的时候,往往需要看一些master或slave的busy / idle状态占比,如果能像看波形那样看到各个master/slave在各个时间段的状态,这样可以非常直观地看出性能瓶颈点. ...

  7. 性能分析神器——XRebel

    1.安装 通过IDEA插件仓库查询JRebel即可,这俩个插件是绑定在一起下载的 XRebel 是不间断运行在 web 应用的交互式分析器,当发现问题会在浏览器中显示警告信息.XRebel 会实时监测 ...

  8. FISCO BCOS工程师常用的性能分析工具推荐

    FISCO BCOS是完全开源的联盟区块链底层技术平台,由金融区块链合作联盟(深圳)(简称金链盟)成立开源工作组通力打造.开源工作组成员包括博彦科技.华为.深证通.神州数码.四方精创.腾讯.微众银行. ...

  9. 阿里巴巴开源性能监控神器Arthas初体验

    如果问性能测试中最难的是哪部分,相信很多人会说"性能调优".确实是这样,性能调优是一个非常复杂.技术含量很高的工作.涉及到的知识面很广.以我多年从业经验来看,在企业里,大多数的性能 ...

最新文章

  1. Do a test write by windows live writer
  2. 创建程序集时元数据失败 -- 拒绝访问_kubectl 创建 Pod 背后到底发生了什么?
  3. Android studio下将项目代码上传至github包括更新,同步,创建依赖
  4. Java | 设计模式-适配器模式
  5. 美团Android资源混淆保护实践
  6. c 汇编语言用标准函数代替,C与汇编的接口技术
  7. 第一百三十一节,JavaScript,封装库--CSS
  8. oppo手机android是多,OPPO手机卡屏?教你三招轻松解决卡顿问题,大部分安卓都适用...
  9. android settings的八个问题
  10. 苹果cms怎么添加友情链接图文教程
  11. 【工具】977- 10个实现炫酷UI设计效果的CSS生成工具
  12. Windows下Appium环境搭建小结
  13. C++ damo_5_继承中的异常_异常的层次结构 20180316 day8
  14. 国泰君安证券 神策数据首发《证券行业数字化财富管理 3A3R 指标体系白皮书》...
  15. 自动定时发送邮件的方法 —— 定时执行专家V6.8
  16. 点击按钮变灰并开始倒计时60秒
  17. 7-104 三天打鱼两天晒网
  18. SqlServer2017 AlwaysOn 读写分离 无域控
  19. Python解析html获取超链接地址并下载解析
  20. 机器学习笔记-投票法(Voting)理论与实现

热门文章

  1. python多分类混淆矩阵代码_深度学习自学记录(3)——两种多分类混淆矩阵的Python实现(含代码)...
  2. HDLC 和 PPP封装简介
  3. 无头结点单链表的逆置_第1章第2节练习题11 就地逆置单链表
  4. bootstrap设置button不显示_电脑便签怎么显示不关闭?电脑云便签敬业签怎么设置显示桌面?...
  5. python库下载安装报错_python3.6下Numpy库下载与安装图文教程
  6. oracle的基本内存结构有,oracle内存结构(一)
  7. vba 当前文件名_VBA实践+批量合并pdf
  8. python写前端代码_python学习之路前端-JavaScript
  9. 计算机上机模拟试题答案,2016计算机二级上机模拟试题及答案
  10. .计算机自动关机或重启,电脑自动关机或者重启怎么处理