提交 4aee768f authored 作者: Thomas Mueller's avatar Thomas Mueller

Profiler: ignore the windows event loop

上级 4df0e737
......@@ -800,7 +800,7 @@ public class WebApp implements DatabaseEventListener {
String success = "<a class=\"error\" href=\"#\" onclick=\"var x=document.getElementById('prof').style;x.display=x.display==''?'none':'';\">" +
"${text.login.testSuccessful}</a>" +
"<span style=\"display: none;\" id=\"prof\"><br />" +
PageParser.escapeHtml(profiler.getTop(1)) +
PageParser.escapeHtml(profiler.getTop(3)) +
"</span>";
session.put("error", success);
// session.put("error", "${text.login.testSuccessful}");
......@@ -1190,7 +1190,7 @@ public class WebApp implements DatabaseEventListener {
profiler.stopCollecting();
SimpleResultSet rs = new SimpleResultSet();
rs.addColumn("Top Stack Trace(s)", Types.VARCHAR, 0, 0);
rs.addRow(profiler.getTop(1));
rs.addRow(profiler.getTop(3));
profiler = null;
return rs;
}
......
......@@ -22,7 +22,7 @@ public class Profiler implements Runnable {
private int depth = 16;
private String[] ignoreLines = StringUtils.arraySplit("", ',', true);
private String[] ignoreThreads = StringUtils.arraySplit(
"java.net.,java.lang.Thread.", ',', true);
"java.net.,java.lang.Thread.,sun.awt.", ',', true);
private volatile boolean stop;
private HashMap<String, Integer> counts = new HashMap<String, Integer>();
private int minCount = 1;
......@@ -137,7 +137,7 @@ public class Profiler implements Runnable {
*/
public String getTop(int max) {
StringBuilder buff = new StringBuilder();
buff.append("Profiler: top stack trace(s) [build-").append(Constants.BUILD_ID).append("]\n");
buff.append("Profiler: top ").append(max).append(" stack trace(s) [build-").append(Constants.BUILD_ID).append("]\n");
@SuppressWarnings("unchecked")
Map.Entry<String, Integer>[] array = new Map.Entry[counts.size()];
counts.entrySet().toArray(array);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论