def time[A](f: => A) = {
val s = System.nanoTime
val ret = f
println("time: " + (System.nanoTime - s) / 1e9 + " seconds")
ret
}
val test = time('statement')
val test = time(spark.sql("SELECT * from mmc_push_event.push_devices"))
No comments:
Post a Comment