Merge pull request #772 from karenfeng/ui-843

Show app duration
This commit is contained in:
Matei Zaharia 2013-08-02 16:37:59 -07:00
commit 22abbc10d6
2 changed files with 7 additions and 1 deletions

View file

@ -128,6 +128,8 @@ class SparkContext(
private[spark] val ui = new SparkUI(this) private[spark] val ui = new SparkUI(this)
ui.bind() ui.bind()
val startTime = System.currentTimeMillis()
// Add each JAR given through the constructor // Add each JAR given through the constructor
if (jars != null) { if (jars != null) {
jars.foreach { addJar(_) } jars.foreach { addJar(_) }

View file

@ -49,6 +49,10 @@ private[spark] class IndexPage(parent: JobProgressUI) {
val summary: NodeSeq = val summary: NodeSeq =
<div> <div>
<ul class="unstyled"> <ul class="unstyled">
<li>
<strong>Duration: </strong>
{parent.formatDuration(now - listener.sc.startTime)}
</li>
<li> <li>
<strong>CPU time: </strong> <strong>CPU time: </strong>
{parent.formatDuration(listener.totalTime + activeTime)} {parent.formatDuration(listener.totalTime + activeTime)}