Commit 7a0b4ff3 authored by wurongjun's avatar wurongjun

测试cpu损耗过高

parent 36068fa5
......@@ -10,28 +10,33 @@ public class Application {
public static void main(String[] args) {
SpringApplication sa = new SpringApplication(Application.class);
sa.run(args);
java.lang.Thread t=new java.lang.Thread(new Runnable() {
@Override
public void run() {
try {
while(true) {
log.info("log test,time:{}", System.currentTimeMillis());
Thread.sleep(10000);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
t.run();
// SpringApplication sa = new SpringApplication(Application.class);
// sa.run(args);
//
// java.lang.Thread t=new java.lang.Thread(new Runnable() {
// @Override
// public void run() {
//
// try {
// while(true) {
// log.info("log test,time:{}", System.currentTimeMillis());
// Thread.sleep(10000);
// }
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
//
// }
// });
// t.run();
int num = 0;
while (true) {
num = num + 1;
if (num == Integer.MAX_VALUE) {
num = 0;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment