<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.io.*,
java.util.*,
java.net.*,
java.lang.management.*"
%>
<html>
<head>
<title>DeProfile</title>
<style type="text/css">
body{font-size:14px;font-family:Arial;}
.stack{font-size:12px; font-family:Arial; margin:10px}
</style>
</head>
<body>
<%
final long DEFAULT_MAX_TIME=1000;
final long DEFAULT_THEAD_ID=0;
/* Get parameter*/
Long overtime =Long.parseLong(request.getParameter("t")==null?"0":request.getParameter("t"));//.getAttribute("t");
Long theadid =Long.parseLong(request.getParameter("i")==null?"0":request.getParameter("i"));//(Long)request.getAttribute("i");
if(overtime==null || overtime<=0){
overtime =DEFAULT_MAX_TIME;
}
if(theadid==null || theadid<=0){
theadid =DEFAULT_THEAD_ID;
}
%>
<form action="" method="POST">
<table cellpadding="0">
<tr>
<td><input type="hidden" name="dir" value="<%=request.getAttribute("dir")%>">
<input type="file" name="myFile"></td>
<td><input type="Submit" class="button" name="Submit" value="上传"></td>
</tr>
</table>
</form>
<%
ThreadMXBean tm = ManagementFactory.getThreadMXBean();
tm.setThreadContentionMonitoringEnabled(true);
long [] tid = tm.getAllThreadIds();
ThreadInfo [] tia = tm.getThreadInfo(tid, Integer.MAX_VALUE);
for (int i = tia.length-1; i > 0; i--) {
long threadId = tia[i].getThreadId();
long cpuTime = tm.getThreadCpuTime(tia[i].getThreadId())/(1000*1000*1000);
out.println("<div>ThreadId:"+threadId+" CPU Time:"+cpuTime+"</div>");
if(cpuTime >= overtime || threadId ==theadid){
out.println("<div>"+"==================================================================="+"</div>");
out.println("<div class=stack>");
out.println("<div>Stack Info - Thread ID: "+threadId+"</div>");
StackTraceElement[] stackElements = tia[i].getStackTrace();
if (stackElements != null) {
for (int s = 0; s < stackElements.length; s++) {
out.println("<div>"+"" + stackElements[s]+"</div>");
}
}
out.println("</div>");
}
}
%>
</body>
</html>
访问http://localhost/deprofiler.jsp?t=10
分享到:
相关推荐
gnome苹果主题
3D-arc-robot-vision.zip,麻省理工学院普林斯顿视觉工具箱,用于在2017亚马逊机器人挑战赛中进行机器人拾取和放置-机器人抓取和一次识别具有深度学习的新物体。,3D建模使用专门的软件来创建物理对象的数字模型。它是...
arc-flatabulous-theme, 带有Flatabulous窗口控件的arc 主题 arc-flatabulous主题arc Flatabulous主题是带有 Flatabulous 窗口控件的 arc 主题。 arc-flatabulous可以用于三种变体 arc-flatabulous Arc-Flatabul
Arc-1.37.0-48361
NULL 博文链接:https://cnmqw.iteye.com/blog/1762660
arc-theme, 具有透明元素的平面主题 arc-主题微软的arc 3和 GNOME 2的透明元素,支持 GTK 3和 GNOME shell,支持基于GTK的桌面环境,如 GNOME,Unity,Budgie,万神庙,Xfce,MATE等等。 arc-可用三种变体 arc
arc-engine9.3最完整许可文件License,其中包括了最完整控件(map,sence等)的许可,没有时间限制,完全破解,是AE开发者必备文件!
Arc-length code is sent.
UL 1699 -2023-.Arc-Fault Circuit-Interrupters
arc-grey-theme, 具有透明元素中性版本的平面主题 arc-灰色主题美国大陆的arc 3和基于 GTK 2的Gnome 3 。Unity 。Pantheon 。XFCE 。Mate等桌面环境都有一个平面的主题。 下载链接 arc-灰色有三种变体 arc 灰色弧线...
This is an Android MVP model good arc-MVP-RxJava-Hybride
弧长法学习案例,用于学习结构屈曲稳定性的例子
资源来自pypi官网。 资源全名:ARC-Alkali-Rydberg-Calculator-2.1.2.tar.gz
python库。 资源全名:arc-py-0.5.tar.gz
Atom-atom-arc-dark-ui.zip,arc dark是一个atom ui主题。原子弧暗用户界面,atom是一个用web技术构建的开源文本编辑器。
英文版,fanuc弧焊机器人arc-mate说明书。 整体功能介绍;尺寸图;规格
基于ARC CPU平台的U-BOOT程序,支持ARC600和ARC700两种CPU
有限元弧长法控制计算的原理,中文英文的都有,并介绍了具体程序的流程图
IOS应用源码之采用ARC-Blocks-GCD封装的网络下载类库.zip
资源来自pypi官网。 资源全名:bio-arc-0.1.0.tar.gz