Cluster stats: \r
-Remove hyperlinks from tasks which workdirs were removed \r
-graph generation \r
- -user documentation\r
+ -user documentation (do not forget how to enable follow symlinks!)\r
-use the same name for output for different executables\r
+ -clean stat db task before packing web app\r
+ -pack web apps with stat db\r
+ +change input size bites\r
+ +add help info for each column in the detailed job list table\r
+ +replace default -1 with ? \r
+ \r
\r
add to help text: To disable a web service remove it from WEB-INF/sun-jaxws.xml descriptor\r
\r
# to the job folders if this path is within JABA web application. \r
# JABAWS statistic application just assume that the last name in the path is the \r
# application folder in the root of JABAWS web application. \r
-cluster.tmp.directory=/cluster/gjb_lab/fc/www-jws2/jaba/jobsout\r
+#cluster.tmp.directory=/cluster/gjb_lab/fc/www-jws2/jaba/jobsout\r
+\r
\r
# Enable/disable cluster statistics collector \r
-cluster.stat.collector.enable=true\r
+cluster.stat.collector.enable=false\r
\r
# Maximum amount of time the job is considered running in hours\r
# Optional defaults to 7 days (168h) \r
#engine.local.thread.number=3\r
\r
# Enable/disable cluster statistics collector\r
-local.stat.collector.enable=true\r
+local.stat.collector.enable=false\r
\r
# Maximum amount of time the job is considered running in hours\r
# Optional defaults to 24 hours\r
\r
<dt:table class="its" id="job" name="${stat.jobs}" export="true" sort="list" pagesize="100" \r
defaultsort="0" defaultorder="descending">\r
+ <dt:caption>JABAWS Jobs List (<a href="#dcolm">detailed column description</a>) </dt:caption> \r
<dt:column title="JobID" sortable="true">\r
<c:choose>\r
<c:when test="${fn:startsWith(job.jobname,'@')}">\r
</c:choose>\r
</dt:column>\r
<dt:column property="clusterJobId" title="Cluster JobID" sortable="false"></dt:column>\r
- <dt:column property="inputSize" title="Input Size (Kb)" sortable="true"></dt:column>\r
- <dt:column property="resultSize" title="Result Size (Kb)" sortable="true"></dt:column>\r
- <dt:column property="runtime" title="Runtime (s)" sortable="true"></dt:column>\r
+ <dt:column property="inputSize" title="Input Size (b)" sortable="true"></dt:column>\r
+ <dt:column property="resultSize" title="Result Size (b)" sortable="true"></dt:column>\r
+ <dt:column title="Runtime (s)" sortable="true">\r
+ <c:choose>\r
+ <c:when test="${job.runtime==-1}">\r
+ ?\r
+ </c:when>\r
+ <c:when test="${job.runtime==0}">\r
+ <1\r
+ </c:when>\r
+ <c:otherwise>\r
+ ${job.runtime}\r
+ </c:otherwise>\r
+ </c:choose>\r
+ </dt:column>\r
<dt:column property="start" title="Start time" sortable="true"></dt:column>\r
<dt:column property="finish" title="Finish time" sortable="true"></dt:column> \r
\r
\r
</dt:table>\r
\r
-<jsp:include page="footer.jsp" />
\ No newline at end of file
+<c:if test="${!empty stat.jobs}">\r
+\r
+<a name="dcolm"></a>Columns\r
+<ul>\r
+ <li>JobID - the JABAWS job id, unique for every job</li>\r
+ <li>Cluster JobID - cluster job id</li>\r
+ <li>InputSize - input size in bytes</li>\r
+ <li>ResultSize - result size in bytes</li>\r
+ <li>Runtime (s) - job's runtime in seconds</li>\r
+ <li>Start time (s)- job's start time and date</li>\r
+ <li>Finish time (s)- job's finish time and date</li>\r
+ <li>isCancelled - whether the job was cancelled</li>\r
+ <li>isCollected - whether the job was collected. False for the jobs that has been initiated but which results has never been retrieved</li>\r
+ <li>isFinished - whether the job has finished. This does not necessarily mean that the job has produced the result. \r
+ The job can sometime finish in failure.</li>\r
+</ul>\r
+</c:if>\r
+ \r
+<jsp:include page="footer.jsp" />\r
\r
<jsp:include page="header.jsp" />\r
\r
+<div style="margin: 20px "> \r
+\r
<h1>JABAWS Usage Statistics</h1>\r
<table class="center its" style="width: 600px "> \r
<thead>\r
<td>${monthTotal.value.abandoned}</td>\r
</tr>\r
</c:forEach>\r
-<tr>\r
+<tr style="font-weight: bolder;">\r
<td>Total:</td>\r
<td>${total.total}</td>\r
<td>${total.incomplete}</td>\r
</tbody>\r
</table>\r
\r
-\r
+<div style="width: 600px">\r
+<h3>Help</h3>\r
+<p>\r
+The table contains the number of jobs processed by JABAWS per month, for the whole \r
+period when the statistics was collected</p> \r
+For each month the table contains the following information. \r
+<ul>\r
+ <li>The period of time for which statistics is displayed. For example Jan 2011 means period of time from the first of \r
+ January to the 31 of January.</li>\r
+ <li>Total - the total number of jobs accepted by JABAWS</li>\r
+ <li>Incomplete - the number of jobs for which the result file was not found or was empty</li>\r
+ <li>Cancelled - the number of jobs cancelled by the user</li>\r
+ <li>Abandoned - the number of jobs which result(s) were not collected</li>\r
+</ul>\r
+The summary for each column is displayed in the last row of the table.\r
+</div> <!-- Help text enclosing dev end -->\r
+</div> <!-- page enclosing div end -->\r
<jsp:include page="footer.jsp" />
\ No newline at end of file
\r
<jsp:include page="header.jsp" />\r
\r
+<div style="margin: 20px "> \r
+\r
<h2>JABAWS Usage Statistics for the Period: <fmt:formatDate value="${startDate}" /> to <fmt:formatDate value="${stopDate}"/></h2>\r
-<h2>All jobs</h2>\r
+<h2>All Jobs</h2>\r
<c:set var="statistics" value="${stat.allStat}" scope="request"/>\r
<c:set var="totals" value="${statTotal}" scope="request"/>\r
<c:import url="StatisticsTable.jsp"/> \r
\r
-<h2>Local jobs</h2>\r
+<h2>Local Jobs</h2>\r
<c:set var="statistics" value="${stat.localStat}" scope="request"/>\r
<c:set var="totals" value="${statTotalLocal}" scope="request"/>\r
<c:import url="StatisticsTable.jsp"/>\r
\r
-<h2>Cluster jobs</h2>\r
+<h2>Cluster Jobs</h2>\r
<c:set var="statistics" value="${stat.clusterStat}" scope="request"/>\r
<c:set var="totals" value="${statTotalCluster}" scope="request"/>\r
<c:import url="StatisticsTable.jsp"/>\r
\r
+<div style="width: 600px">\r
+<h3>Help</h3>\r
+<p>\r
+Each table contains the number of jobs processed by JABAWS during the period of \r
+time specified in the title.</p> \r
+<ul>\r
+<li>The "All Jobs" table contains the summary of all jobs.</li> \r
+<li>"Local Jobs" table - contains the summary of the jobs calculated by the local engine.</li> \r
+<li>"Cluster Jobs" table - contains the summary of the jobs calculated by the cluster.</li>\r
+</ul>\r
+Each table contains the following information for each web service \r
+<ul>\r
+ <li>Total - the total number of jobs accepted by a particular JABA service</li>\r
+ <li>Incomplete - the number of jobs for which the result file was not found or was empty</li>\r
+ <li>Cancelled - the number of jobs cancelled by the user</li>\r
+ <li>Abandoned - the number of jobs which result(s) were not collected</li>\r
+</ul>\r
+</div> <!-- Help text enclosing dev end -->\r
+</div> <!-- page enclosing div ends -->\r
+\r
<jsp:include page="footer.jsp" />\r
return UNDEFINED;\r
}\r
\r
+ /*\r
+ * TODO unify input!\r
+ */\r
long getInputSize() {\r
- File input = files.get("fasta.in");\r
+ Class<? extends Executable<?>> name = Services\r
+ .getRunnerByJobDirectory(jobdir);\r
+\r
+ File input = null;\r
+ if (name.getSimpleName().equalsIgnoreCase("ClustalW")) {\r
+ input = files.get("input.txt");\r
+ } else {\r
+ input = files.get("fasta.in");\r
+ }\r
+\r
if (input != null) {\r
return input.length();\r
}\r
@Override\r
public void run() {\r
log.info("Started updating statistics at " + new Date());\r
+ log.info("For directory: " + workDirectory.getAbsolutePath());\r
\r
collectStatistics();\r
\r
package compbio.stat.collector;\r
\r
import java.sql.Timestamp;\r
+import java.text.DateFormat;\r
import java.text.SimpleDateFormat;\r
import java.util.Comparator;\r
import java.util.Date;\r
+import java.util.Locale;\r
\r
import compbio.engine.client.ConfExecutable;\r
import compbio.util.Util;\r
}\r
};\r
\r
+ private static DateFormat DATE_TIME = SimpleDateFormat.getDateTimeInstance(\r
+ DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.UK);\r
+\r
Services webService;\r
String clusterJobId;\r
String jobname;\r
\r
public String getStart() {\r
if (start != ExecutionStatCollector.UNDEFINED) {\r
- return SimpleDateFormat.getDateTimeInstance().format(\r
- new Date(start));\r
+ return DATE_TIME.format(new Date(start));\r
}\r
return "?";\r
}\r
\r
public String getFinish() {\r
if (finish != ExecutionStatCollector.UNDEFINED) {\r
- return SimpleDateFormat.getDateTimeInstance().format(\r
- new Date(finish));\r
+ return DATE_TIME.format(new Date(finish));\r
}\r
return "?";\r
}\r
\r
public long getInputSize() {\r
if (inputSize != ExecutionStatCollector.UNDEFINED) {\r
- return inputSize / 1000;\r
+ return inputSize;\r
}\r
return 0;\r
}\r
\r
public long getResultSize() {\r
if (resultSize > 0) {\r
- return resultSize / 1000;\r
+ return resultSize;\r
}\r
return 0;\r
}\r
import javax.servlet.http.HttpServletResponse;\r
import javax.servlet.http.HttpSession;\r
\r
-import compbio.engine.conf.PropertyHelperManager;\r
+import compbio.engine.client.PathValidator;\r
import compbio.stat.collector.StatDB;\r
import compbio.stat.collector.StatProcessor;\r
-import compbio.util.PropertyHelper;\r
import compbio.util.Util;\r
import compbio.ws.client.Services;\r
\r
throw new ServletException("'toDate' is not specified!");\r
}\r
\r
- PropertyHelper helper = PropertyHelperManager.getPropertyHelper();\r
- String clusterTempDir = helper.getProperty("cluster.tmp.directory")\r
- .trim();\r
- clusterTempDir = new File(clusterTempDir).getName();\r
- String localTempDir = helper.getProperty("local.tmp.directory").trim();\r
+ // Just extract the last name from the path\r
+ String clusterTempDir = StatisticCollector.getClusterJobDir();\r
+ if (!Util.isEmpty(clusterTempDir)) {\r
+ clusterTempDir = new File(clusterTempDir).getName();\r
+ } else {\r
+ clusterTempDir = "";\r
+ }\r
+ // Just extract the last name from the path\r
+ String localTempDir = StatisticCollector.getLocalJobDir();\r
+ if (!Util.isEmpty(localTempDir)) {\r
+ if (PathValidator.isAbsolutePath(localTempDir)) {\r
+ localTempDir = new File(localTempDir).getName();\r
+ }\r
+ } else {\r
+ localTempDir = "";\r
+ }\r
\r
Timestamp startDate = new Timestamp(Long.parseLong(fromDate));\r
Timestamp stopDate = new Timestamp(Long.parseLong(toDate));\r