You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ueshin (via GitHub)" <gi...@apache.org> on 2024/02/12 21:39:28 UTC

Re: [PR] [SPARK-47014][PYTHON][CONNECT] Implement methods dumpPerfProfiles and dumpMemoryProfiles of SparkSession [spark]

ueshin commented on code in PR #45073:
URL: https://github.com/apache/spark/pull/45073#discussion_r1484720984


##########
python/pyspark/sql/tests/test_udf_profiler.py:
##########
@@ -185,6 +185,9 @@ def test_perf_profiler_udf(self):
         with self.trap_stdout() as io_all:
             self.spark.showPerfProfiles()
 
+        d = tempfile.gettempdir()

Review Comment:
   Should use:
   ```py
   with tempfile.TemporaryDirectory() as d:
       ...
   ```
   ?



##########
python/pyspark/tests/test_memory_profiler.py:
##########
@@ -232,6 +232,9 @@ def test_memory_profiler_udf(self):
         with self.trap_stdout() as io_all:
             self.spark.showMemoryProfiles()
 
+        d = tempfile.gettempdir()

Review Comment:
   ditto.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org