diff options
author | Karen Feng <karenfeng.us@gmail.com> | 2013-08-02 13:25:14 -0700 |
---|---|---|
committer | Karen Feng <karenfeng.us@gmail.com> | 2013-08-02 13:25:14 -0700 |
commit | b3ae5b25d5e20c422049dc0cada397e51f52cb32 (patch) | |
tree | dacba8014a6a87f35eb89631839e94bf14488ca0 /core | |
parent | 999eaac78cc3724dba2b99bbfd8b381999a587c5 (diff) | |
download | spark-b3ae5b25d5e20c422049dc0cada397e51f52cb32.tar.gz spark-b3ae5b25d5e20c422049dc0cada397e51f52cb32.tar.bz2 spark-b3ae5b25d5e20c422049dc0cada397e51f52cb32.zip |
Shows time the app has been running
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/SparkContext.scala | 2 | ||||
-rw-r--r-- | core/src/main/scala/spark/ui/jobs/IndexPage.scala | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/SparkContext.scala b/core/src/main/scala/spark/SparkContext.scala index 0d1f9fa8d4..ca5ea30d22 100644 --- a/core/src/main/scala/spark/SparkContext.scala +++ b/core/src/main/scala/spark/SparkContext.scala @@ -128,6 +128,8 @@ class SparkContext( private[spark] val ui = new SparkUI(this) ui.bind() + val startTime = System.currentTimeMillis() + // Add each JAR given through the constructor if (jars != null) { jars.foreach { addJar(_) } diff --git a/core/src/main/scala/spark/ui/jobs/IndexPage.scala b/core/src/main/scala/spark/ui/jobs/IndexPage.scala index 4ad787565d..12166f10c2 100644 --- a/core/src/main/scala/spark/ui/jobs/IndexPage.scala +++ b/core/src/main/scala/spark/ui/jobs/IndexPage.scala @@ -54,7 +54,11 @@ private[spark] class IndexPage(parent: JobProgressUI) { val summary: NodeSeq = <div> <ul class="unstyled"> - <li> + <li> + <strong>Duration: </strong> + {parent.formatDuration(now - listener.sc.startTime)} + </li> + <li> <strong>CPU time: </strong> {parent.formatDuration(listener.totalTime + activeTime)} </li> |