-
Jprofiler安装
下载链接:http://www.downxia.com/downinfo/222572.html
注册码:(第一个测试可用)
L-Larry_Lau@163.com#23874-hrwpdp1sh1wrn#0620
L-Larry_Lau@163.com#36573-fdkscp15axjj6#25257
L-Larry_Lau@163.com#5481-ucjn4a16rvd98#6038
L-Larry_Lau@163.com#99016-hli5ay1ylizjj#27215
L-Larry_Lau@163.com#40775-3wle0g1uin5c1#0674 -
idea插件安装
file–>setting–>plugins–>browse repositories 搜索jprofiler安装重启即可
-
idea测试
测试内容为set和构造函数的区别,内容为转载文章内容主要侧重工具使用,详细文章请转大师兄文章:https://blog.youkuaiyun.com/qq_27093465/article/details/92763548
测试类:
public class TestClass {
public static void main(String[] args) {
testFast();
}
private static void testFast() {
while (true) {
set();
construct();
}
}
private static void construct() {
Student studentTest = new Student("456", "女","1","kdjhf");
}
private static void set() {
Student student = new Student();
student.setName("123");
student.setSex("男");
student.setClassId("1");
student.setAddr("1");
}
static class Student {
String name;
String sex;
String classId;
String addr;
public Student() {
}
public Student(String name, String sex, String classId, String addr) {
this.name = name;
this.sex = sex;
this.classId = classId;
this.addr = addr;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getClassId() {
return classId;
}
public void setClassId(String classId) {
this.classId = classId;
}
public String getAddr() {
return addr;
}
public void setAddr(String addr) {
this.addr = addr;
}
}
}
运行时选取profile …
第一次运行需要选择jprofiler的安装路径:安装路径\bin\jprofiler.exe,运行之后,点击ok即可
通过cpu views查看对比
错误提示
-
注册码无效:
The network connection has been lost. The JVM has terminated unexpectedly
idea控制台输出:ERROR:Invalid license key. Aborting.
设置新的注册码: help–>enter license key -
连接错误:
The JVM has exited.Some profiling information will not be available.
在session setting -->Profiling Settings–>Customize Profiling Settiongs–>Miscellaneous
选中“Keep VM alive”选项框