<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Checking spark performance locally in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/checking-spark-performance-locally/m-p/27151#M19031</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am experimenting with spark, on my local machine. So, is there some tool/api available to check the performance of the code I write?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg. I write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val startTime = System.nanoTime()
  invoicesDF
    .select(
      count("*").as("Total Number Of Invoices"),
      sum("Quantity").as("Total Quantity"),
      avg("UnitPrice").as("Avg Unit Price"),
      countDistinct("InvoiceNo").as("Number Of Unique Invoices")
    )
    .show()
&amp;nbsp;
  println((System.nanoTime() - startTime) / 1000000000.0)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am using System.nanoTime to do these calculations, but am not sure of this is correct way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, this takes time of around 2.7 seconds, using 3 threads, and file having 541900 records. Is it a good performance? It is a 16GB, 4 core, 2.40GHz&amp;nbsp;Intel processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Oct 2022 04:57:00 GMT</pubDate>
    <dc:creator>mghildiy</dc:creator>
    <dc:date>2022-10-15T04:57:00Z</dc:date>
    <item>
      <title>Checking spark performance locally</title>
      <link>https://community.databricks.com/t5/data-engineering/checking-spark-performance-locally/m-p/27151#M19031</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am experimenting with spark, on my local machine. So, is there some tool/api available to check the performance of the code I write?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg. I write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val startTime = System.nanoTime()
  invoicesDF
    .select(
      count("*").as("Total Number Of Invoices"),
      sum("Quantity").as("Total Quantity"),
      avg("UnitPrice").as("Avg Unit Price"),
      countDistinct("InvoiceNo").as("Number Of Unique Invoices")
    )
    .show()
&amp;nbsp;
  println((System.nanoTime() - startTime) / 1000000000.0)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am using System.nanoTime to do these calculations, but am not sure of this is correct way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, this takes time of around 2.7 seconds, using 3 threads, and file having 541900 records. Is it a good performance? It is a 16GB, 4 core, 2.40GHz&amp;nbsp;Intel processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 04:57:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/checking-spark-performance-locally/m-p/27151#M19031</guid>
      <dc:creator>mghildiy</dc:creator>
      <dc:date>2022-10-15T04:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Checking spark performance locally</title>
      <link>https://community.databricks.com/t5/data-engineering/checking-spark-performance-locally/m-p/27152#M19032</link>
      <description>&lt;P&gt;Please check the details about your code (task in jobs) in Spark UI.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 16:45:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/checking-spark-performance-locally/m-p/27152#M19032</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-20T16:45:28Z</dc:date>
    </item>
  </channel>
</rss>

