[jboss-cvs] JBoss Profiler SVN: r426 - in trunk/java/webRoot: transactionMethodsTree and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 19 21:04:15 EST 2008
Author: Huijuan Shao
Date: 2008-02-19 21:04:15 -0500 (Tue, 19 Feb 2008)
New Revision: 426
Added:
trunk/java/webRoot/transactionMethodsTree/
trunk/java/webRoot/transactionMethodsTree/images/
trunk/java/webRoot/transactionMethodsTree/images/close.gif
trunk/java/webRoot/transactionMethodsTree/images/kfolder1.gif
trunk/java/webRoot/transactionMethodsTree/images/open.gif
trunk/java/webRoot/transactionMethodsTree/methodExplorer.jsp
trunk/java/webRoot/transactionMethodsTree/methodTree.jsp
trunk/java/webRoot/transactionMethodsTree/treeFrameTest.jsp
trunk/java/webRoot/transactionMethodsTree/treeMainFresh.js
trunk/java/webRoot/transactionMethodsTree/treeSubMenu.jsp
trunk/java/webRoot/transactionMethodsTree/treeTable.jsp
trunk/java/webRoot/transactionMethodsTree/treeTop.jsp
trunk/java/webRoot/transactionMethodsTree/treecss.css
Log:
Enhanced tracer of profiler, including summarizing and grouping functions.
--transactionMethodsTree added.
Added: trunk/java/webRoot/transactionMethodsTree/images/close.gif
===================================================================
(Binary files differ)
Property changes on: trunk/java/webRoot/transactionMethodsTree/images/close.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/java/webRoot/transactionMethodsTree/images/kfolder1.gif
===================================================================
(Binary files differ)
Property changes on: trunk/java/webRoot/transactionMethodsTree/images/kfolder1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/java/webRoot/transactionMethodsTree/images/open.gif
===================================================================
(Binary files differ)
Property changes on: trunk/java/webRoot/transactionMethodsTree/images/open.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/java/webRoot/transactionMethodsTree/methodExplorer.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/methodExplorer.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/methodExplorer.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,35 @@
+ <%
+/**
+ * @author Huijuan Shao
+ */
+%>
+
+<%@ include file="../tracerInternal.inc"%>
+<%@ include file="../traceTree.inc"%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
+<script type="text/javascript" src="treeMainFresh.js"></script>
+<link rel="stylesheet" type="text/css" href="treecss.css"/>
+
+<script type="text/javascript" src="treeLeft.js"></script>
+<base target="f3" />
+</head>
+<body>
+<iframe id="hiddenframe" name="hiddenframe" width="0" height="0" src="" frameborder="0" scrolling="no"></iframe>
+
+<div class="b1 m4">
+ <div class="b1">
+ <a href="javascript:submenu(1,0)" target="_self">
+ <img id="submenuimg_brd_1_0" src="images/close.gif" class="pm" alt="+">
+ <script type="text/javascript">putImage('kfolder1.gif','class="s16x16"');</script></a>
+ <a href="treeTable.jsp?depth=1&serial=0"><%
+ ArrayList arraylist = jbtTransactionTree.traverseGetArrayList();
+ JBTTransactionTreeNode node=(JBTTransactionTreeNode) arraylist.get(0);
+ out.write(node.getSequenceNo()+":"+GroupUtil.convertToHTML(node.getName()));//GroupUtil.convertToHTML
+ %></a><br/>
+ <div id="submenu_brd_1_0" class="llineback"></div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/java/webRoot/transactionMethodsTree/methodTree.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/methodTree.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/methodTree.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,32 @@
+ <%
+/**
+ * @author Huijuan Shao
+ */
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<title>transactionMethodsTree</title>
+<script type="text/javascript" src="treeMainFresh.js"></script>
+</head>
+<script type="text/javascript">
+<!--
+ var mainurl = "treeTable.jsp?depth=1&serial=0";
+ var fftop='treeTop.jsp';
+var ffleft = 'methodExplorer.jsp'
+
+ document.write(''+
+ '<frameset name=mainframe id=mainframe border=0 rows=124,*>'+
+ '<frame name=menu noresize="true" marginwidth=0 marginheight=0 src="'+fftop+'">'+
+'<frameset name=mainframe1 id=mainframe1 frameborder=8 border=8 cols="40%,*">'+
+ '<frame name=menu marginwidth=0 marginheight=0 src="'+ffleft+'">'+
+ '<frame marginwidth=0 marginheight=0 name=f3 src="'+mainurl+'">'+
+'</frameset>'+
+'</frameset>');
+//-->
+</script>
+
+</html>
+
Added: trunk/java/webRoot/transactionMethodsTree/treeFrameTest.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treeFrameTest.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treeFrameTest.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<title>transactionMethodsTree</title>
+<script type="text/javascript" src="treeMainFresh.js"></script>
+</head>
+<script type="text/javascript">
+<!--
+ var mainurl = "treeTable.jsp?depth=1&serial=0";
+ var fftop='treeTop.jsp';
+ var ffleft = 'methodExplorer.jsp'
+ var ffmsg = 'images/img.gif';
+ var fffoot = 'treeMainFoot.htm';
+ document.write(''+
+ '<frameset name=mainframe id=mainframe frameborder=0 border=0 rows=120,*>'+
+ '<frame name=menu noresize="true" marginwidth=0 marginheight=0 src="'+fftop+'">'+
+'<frameset name=mainframe id=mainframe frameborder=0 border=0 cols="400,11,*">'+
+ '<frame name=menu noresize="true" marginwidth=0 marginheight=0 src="'+ffleft+'">'+
+ '<frame scrolling=no noresize="true" name=toogle marginwidth=0 marginheight=0 src="columnBreak.htm">'+
+ '<frameset name="viewfrm" id="viewfrm" rows="*,20">'+
+ '<frame marginwidth=0 marginheight=0 name="f3" src="'+mainurl+'">'+
+ '<frame scrolling=no noresize="true" marginwidth=4 marginheight="1" name="f4" src="'+fffoot+'">'+
+ '</frameset>'+
+'</frameset>'+
+'</frameset>');
+//-->
+</script>
+</html>
+
+<//the following is good>
+<frameset noresize="true" border=0 rows="124,*">
+ <frame frameborder=0 border=0 name="treeTop" noresize="true" marginwidth=0 marginheight=0 src="treeTop.jsp">
+ <frameset frameborder=10 border=10 cols="50%,*">
+ <frame src="methodExplorer.jsp" name="methodTree">
+ <frame src="treeTable.jsp?depth=1&serial=0" name="treeTable">
+ </frameset>
+</frameset>
+
+completely ok!
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<title>transactionMethodsTree</title>
+<script type="text/javascript" src="treeMainFresh.js"></script>
+</head>
+<script type="text/javascript">
+<!--
+ var mainurl = "treeTable.jsp?depth=1&serial=0";
+ var fftop='treeTop.jsp';
+ var ffleft = 'methodExplorer.jsp'
+ var ffmsg = 'images/img.gif';
+ var fffoot = 'treeMainFoot.htm';
+ document.write(''+
+ '<frameset name=mainframe id=mainframe border=0 rows=124,*>'+
+ '<frame name=menu noresize="true" marginwidth=0 marginheight=0 src="'+fftop+'">'+
+'<frameset name=mainframe id=mainframe frameborder=8 border=8 cols="40%,*">'+
+ '<frame name=menu marginwidth=0 marginheight=0 src="'+ffleft+'">'+
+ '<frame marginwidth=0 marginheight=0 name="f3" src="'+mainurl+'">'+
+'</frameset>'+
+'</frameset>');
+//-->
+</script>
+</html>
\ No newline at end of file
Added: trunk/java/webRoot/transactionMethodsTree/treeMainFresh.js
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treeMainFresh.js (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treeMainFresh.js 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,40 @@
+function putImageCode(filename,otherparam) {
+ return('<img src="images/'+filename+'" '+otherparam+'>');
+}
+
+function putImage(filename,otherparam)
+{
+ document.write(putImageCode(filename,otherparam));
+}
+
+function submenu( depth , serial )
+{
+ var linkurl, submenuname, imgname;
+ linkurl = "treeSubMenu.jsp?depth=" + depth + "&serial=" + serial;
+ submenuname = "submenu_brd_" + depth + "_" + serial ;
+ imgname = "submenuimg_brd_" + depth + "_" + serial ;
+
+ var submenustatus = document.getElementById(submenuname).style.display;
+ if (submenustatus == "block")
+ {
+ document.getElementById(imgname).src="images/close.gif";
+ document.getElementById(submenuname).style.display = "none";
+ } else {
+ document.getElementById(imgname).src="images/open.gif";
+ document.getElementById(submenuname).style.display = "block";
+ document.getElementById(submenuname).innerHTML="<div class='b1'>waiting...</div>";
+ window.frames["hiddenframe"].document.location.href = linkurl ;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
Added: trunk/java/webRoot/transactionMethodsTree/treeSubMenu.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treeSubMenu.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treeSubMenu.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,88 @@
+ <%
+/**
+ * @author Huijuan Shao
+ */
+%>
+
+<%@ include file="../tracerInternal.inc"%>
+<%@ include file="../traceTree.inc"%>
+
+<%
+ int depth = Integer.parseInt(request.getParameter("depth"));
+ int serial = Integer.parseInt(request.getParameter("serial"));
+ int serial_s = 0;
+ int i;
+ int tail_i=0;
+
+ ArrayList arraylist = jbtTransactionTree.traverseGetArrayList();
+
+%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<script type="text/javascript" src="treeMainFresh.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+<!--
+<%
+ out.write("parent.document.getElementById('submenu_brd_" + depth + "_" + serial +"').innerHTML = \"");
+
+for (i=0;i<arraylist.size();i++ )
+{
+ JBTTransactionTreeNode node=(JBTTransactionTreeNode) arraylist.get(i);
+
+ if ( node.getJBTMethod().getDepth() == depth )
+ {
+ if ( serial == 0 )
+ {
+ for ( ++i;i<arraylist.size();i++ )
+ {
+ node=(JBTTransactionTreeNode) arraylist.get(i);
+ if ( node.getJBTMethod().getDepth() == depth + 1 )
+ {
+ if ( i < arraylist.size()-1 )
+ {
+ JBTTransactionTreeNode node1 = (JBTTransactionTreeNode) arraylist.get(i+1);
+ if ( node1.getJBTMethod().getDepth() == depth + 2 )
+ {
+ out.write("<div class='fi' id='div_" + i + "'>");
+ out.write("<a href='javascript:submenu(" + (depth+1) + "," + serial_s + ")' target='_self'>");
+ out.write("<img id='submenuimg_brd_" + (depth+1) + "_" + serial_s + "' src='images/close.gif' class='pm' alt='+'>");
+ out.write("</a>");
+ out.write("<a href='treeTable.jsp?depth=" + (depth+1) + "&serial=" + serial_s + "'>\"" + "+putImageCode('kfolder1.gif','class=\"s16x16\"')+\"");
+ out.write(node.getSequenceNo()+":"+GroupUtil.convertToHTML(node.getName()) + "</a></div><div id='submenu_brd_" + (depth+1) + "_" + serial_s + "' class='llineback'></div>");
+ serial_s++;
+ tail_i=i;
+ continue;
+ }
+ }
+ out.write("<div class='mi' id='div_" + i + "'>");
+ out.write("<a href='treeTable.jsp?depth=" + (depth+1) + "&serial=" + serial_s + "'>" + node.getSequenceNo()+":"+GroupUtil.convertToHTML(node.getName()) + "</a></div>");
+ serial_s++;
+ tail_i=i;
+ }
+ else if ( node.getJBTMethod().getDepth() == depth )
+ break;
+ }
+ break;
+ }
+ else
+ serial--;
+ }
+ else if ( node.getJBTMethod().getDepth() == depth+1 )
+ serial_s++;
+}
+out.write('"');
+%>
+var cname=parent.document.getElementById('div_<%=tail_i%>').className;
+if ( cname == "mi" )
+ parent.document.getElementById('div_<%=tail_i%>').className = "lmi";
+else
+{
+ parent.document.getElementById('submenu_brd_<%=depth+1%>_<%=serial_s-1%>').className = "llineback";
+ parent.document.getElementById('div_<%=tail_i%>').className = "lfi";
+}
+//-->
+</script>
+</body></html>
Added: trunk/java/webRoot/transactionMethodsTree/treeTable.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treeTable.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treeTable.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,213 @@
+ <%
+/**
+ * @author Huijuan Shao
+ */
+%>
+
+<%@ include file="../tracerInternal.inc"%>
+<%@ include file="../traceTree.inc"%>
+
+<%
+ int depth = Integer.parseInt(request.getParameter("depth"));
+ int serial = Integer.parseInt(request.getParameter("serial"));
+ int i;
+ boolean odd=true;
+ ArrayList arraylist = jbtTransactionTree.traverseGetArrayList();
+
+%>
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="../imgs/profilerStyles.css">
+</head>
+<body>
+<table class="main">
+ <tr class="title" bgcolor="#003366" bordercolor="#666666" style="COLOR:white;">
+ <td colspan=2>Methods Order</td>
+ <td nowrap="nowrap">Depth</td>
+ <td nowrap="nowrap">Start Time</td>
+ <td nowrap="nowrap">End Time</td>
+ <td nowrap="nowrap">Total Time</td>
+ <td nowrap="nowrap">Method Running Time</td>
+ <td nowrap="nowrap">CPU Time</td>
+ <td nowrap="nowrap">#Locks</td>
+ <td nowrap="nowrap">Lock Time</td>
+ </tr>
+ <%
+ int line=0;
+ for ( i=0;i<arraylist.size();i++ )
+ {
+ JBTTransactionTreeNode node=(JBTTransactionTreeNode) arraylist.get(i);
+ if ( node.getJBTMethod().getDepth() == depth )
+ {
+
+ if ( serial == 0 )
+ {
+ %>
+ <%
+ if ((line++)%2==0) out.println("<tr class=root"+" bgcolor=white>");
+ else out.println("<tr class=root"+" bgcolor=\"#cccccc\">");
+ %>
+ <td colspan=2 align="left">
+ <a title='Click see detailed methods Info' href="../transactionMethodsDetail.jsp?lineNo=<%=node.getSequenceNo()%>" target="_blank">
+ <%=node.getSequenceNo()+":"+GroupUtil.convertToHTML(node.getName()) %>
+ </a>
+ </td>
+ <td><%=node.getJBTMethod().getDepth() %></td>
+<%
+ JBTMethod transactionMethod=node.getJBTMethod();
+ long startTime = transactionMethod.getElapsedClockStart();
+ long endTime = transactionMethod.getElapsedClockEnd();
+
+ Date date1 = new Date (startTime);
+ DateFormat df = new SimpleDateFormat ("HH:mm:ss.SSS");
+ out.print("<td>" + df.format(date1) + "</td>");
+
+ if (endTime!=-1)
+ {
+ Date date2 = new Date(endTime);
+ out.print("<td>" + df.format(date2) + "</td>");
+
+ if ( (request.getParameter("methodElapse")!=null) &&
+ ((long)(endTime-startTime)>Long.parseLong(request.getParameter("methodElapse"))) )
+ {out.print("<td><font color="#0000ff"><b>" +
+ (long)(endTime-startTime) + "</b></font></td>");
+ }
+ else{
+ out.print("<td>" + (long)(endTime-startTime) + "</td>");
+ }
+ }
+ else
+ {
+ if ( (request.getParameter("methodElapse")!=null) )
+ {
+ out.print("<td><font color="#0000ff"><b>NOT EXIT</b></font></td>");
+ }
+ else{
+ out.print("<td>NOT EXIT</td>");
+ }
+ out.print("<td>UNKNOWN</td>");
+ }
+
+ if(node.getMethodRunningTime()==-1){
+ out.print("<td>UNKNOWN</td>");
+ }else
+ out.print("<td>" + node.getMethodRunningTime() + "</td>");
+
+ long startCPU = transactionMethod.getClockStart();
+ long endCPU = transactionMethod.getClockEnd();
+
+ if (endCPU!=-1) out.print("<td>" + (long)(endCPU-startCPU) + "</td>");
+ else out.print("<td>UNKNOWN</td>");
+
+ if (transactionMethod.getNumberOfLocks()==0)
+ {
+ out.print("<td> </td><td> </td>");
+ }
+ else
+ {
+ out.print("<td>" + transactionMethod.getNumberOfLocks() + "</td>");
+ out.print("<td>" + transactionMethod.getLockTime() + "</td>");
+ }
+
+
+%>
+ </tr>
+ <%
+ for ( ++i;i<arraylist.size();i++ )
+ {
+ node=(JBTTransactionTreeNode) arraylist.get(i);
+ transactionMethod=node.getJBTMethod();
+ if ( node.getJBTMethod().getDepth() == depth + 1 )
+ {
+ %>
+ <%
+ String tmp;
+ if(odd) tmp="odd";
+ else tmp="even";
+ if ((line++)%2==0) out.println("<tr class="+tmp+" bgcolor=white>");
+ else out.println("<tr class="+tmp+" bgcolor=\"#cccccc\">");
+ %>
+ <!-- tr class="<%=(odd)?"odd":"even"%>"-->
+
+ <td> </td>
+ <td align="left">
+ <a title='Click see detailed methods Info' href="../transactionMethodsDetail.jsp?lineNo=<%=node.getSequenceNo()%>" target="_blank">
+ <%=node.getSequenceNo()+" "+GroupUtil.convertToHTML(node.getName()) %>
+ </a>
+ </td>
+ <td><%=node.getJBTMethod().getDepth() %></td>
+<%
+ startTime = transactionMethod.getElapsedClockStart();
+ endTime = transactionMethod.getElapsedClockEnd();
+
+ date1 = new Date (startTime);
+ df = new SimpleDateFormat ("HH:mm:ss.SSS");
+ out.print("<td>" + df.format(date1) + "</td>");
+
+ if (endTime!=-1)
+ {
+ Date date2 = new Date(endTime);
+ out.print("<td>" + df.format(date2) + "</td>");
+
+ if ( (request.getParameter("methodElapse")!=null) &&
+ ((long)(endTime-startTime)>Long.parseLong(request.getParameter("methodElapse"))) )
+ {out.print("<td><font color="#0000ff"><b>" +
+ (long)(endTime-startTime) + "</b></font></td>");
+ }
+ else{
+ out.print("<td>" + (long)(endTime-startTime) + "</td>");
+ }
+ }
+ else
+ {
+ if ( (request.getParameter("methodElapse")!=null) )
+ {
+ out.print("<td><font color="#0000ff"><b>NOT EXIT</b></font></td>");
+ }
+ else{
+ out.print("<td>NOT EXIT</td>");
+ }
+ out.print("<td>UNKNOWN</td>");
+ }
+
+ if(node.getMethodRunningTime()==-1){
+ out.print("<td>UNKNOWN</td>");
+ }else
+ out.print("<td>" + node.getMethodRunningTime() + "</td>");
+
+ startCPU = transactionMethod.getClockStart();
+ endCPU = transactionMethod.getClockEnd();
+
+ if (endCPU!=-1) out.print("<td>" + (long)(endCPU-startCPU) + "</td>");
+ else out.print("<td>UNKNOWN</td>");
+
+ if (transactionMethod.getNumberOfLocks()==0)
+ {
+ out.print("<td> </td><td> </td>");
+ }
+ else
+ {
+ out.print("<td>" + transactionMethod.getNumberOfLocks() + "</td>");
+ out.print("<td>" + transactionMethod.getLockTime() + "</td>");
+ }
+
+
+%>
+ </tr>
+
+ <%
+ odd=(!odd);
+ }
+ else if ( node.getJBTMethod().getDepth() == depth )
+ break;
+ }
+ break;
+ }
+ else
+ serial--;
+ }
+ }
+ %>
+</table>
+</body>
+</html>
Added: trunk/java/webRoot/transactionMethodsTree/treeTop.jsp
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treeTop.jsp (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treeTop.jsp 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,8 @@
+ <%
+/**
+ * @author Huijuan Shao
+ */
+%>
+<%@ include file="../tracerInternal.inc"%>
+<%@ include file="../traceTree.inc"%>
+<%@ include file="../traceTree_top.inc"%>
Added: trunk/java/webRoot/transactionMethodsTree/treecss.css
===================================================================
--- trunk/java/webRoot/transactionMethodsTree/treecss.css (rev 0)
+++ trunk/java/webRoot/transactionMethodsTree/treecss.css 2008-02-20 02:04:15 UTC (rev 426)
@@ -0,0 +1,61 @@
+body {
+ BACKGROUND-COLOR: white;
+ FONT-SIZE: 16px;
+ COLOR: black;
+ scrollbar-3dlight-color:#170708;
+ scrollbar-arrow-color:#000000;
+ scrollbar-base-color:#170708;
+ scrollbar-darkshadow-color:#ffffff;
+ scrollbar-face-color:#EEEAEB;
+ scrollbar-highlight-color:#FBFDFC;
+ scrollbar-shadow-color:#170708;
+ overflow-x:hidden;
+ margin: 0px;
+ padding: 0px;
+}
+
+.b1 {
+ font-family: "Arial", "Helvetica", "sans-serif";
+ font-size: 16px;
+ color: #000000;
+ text-decoration: none;
+}
+
+a:link {
+ font-size: 16px;
+ color: rgb(0,0,102);
+ text-decoration: underline;
+}
+
+a:visited {
+ font-size: 16px;
+ color: rgb(0,0,102);
+ text-decoration: none;
+}
+
+a:hover {
+ font-size: 16px;
+ color: #FF0000;
+ text-decoration: none;
+}
+
+img.s16x16 {
+ width: 16px;
+ height: 16px;
+ border: 0px;
+ vertical-align: middle;
+ margin-right: 2px;
+}
+
+img.pm {
+ border: 0px;
+ vertical-align: middle;
+ margin: 1px 0px;
+}
+
+div.llineback {
+ padding-left: 20px;
+ display: none;
+}
+
+
More information about the jboss-cvs-commits
mailing list