Skip to content

Instantly share code, notes, and snippets.

View kmate's full-sized avatar
💭
🍻

Máté Karácsony kmate

💭
🍻
View GitHub Profile
@kmate
kmate / profiling.scala
Last active October 15, 2024 07:14
How to profile query read + compute performance using flame graphs on Databricks
// get the profiler instance
val env = org.apache.spark.SparkEnv.get
val profiler = env.profiler
// start a profiling session
// optionally, you can provide an instance of
// com.databricks.spark.profiler.RunParameters
// that parametrizes async-profiler, default is event=cpu
val session = profiler.run()