GitHub user rxin opened a pull request:
https://github.com/apache/spark/pull/16140
[SPARK-18714][SQL] Add a simple time function to SparkSession
## What changes were proposed in this pull request?
Many Spark developers often want to test the runtime of some function in
interactive debugging and testing. This patch adds a simple time function to
SparkSession:
```
scala> spark.time { spark.range(1000).count() }
Time taken: 77 ms
res1: Long = 1000
```
## How was this patch tested?
I tested this interactively in spark-shell.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rxin/spark SPARK-18714
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16140.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16140
----
commit 76d2f5319e5ec65bdbeb3ba0467b60f3e2733f76
Author: Reynold Xin <[email protected]>
Date: 2016-12-05T06:10:51Z
[SPARK-18714][SQL] Add a simple time function to SparkSession
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]