Convert TimeitResult object to human readable string in v1.py

This commit is contained in:
Ștefan-Cosmin Ciocan
2023-12-18 16:30:25 +01:00
committed by Andrei Nechaev
parent 0a71d56e5d
commit 6f2cc6f13c
+1
View File
@@ -28,6 +28,7 @@ class NVCCPlugin(Magics):
stmt = f"subprocess.check_output(['{file_path}.out'], stderr=subprocess.STDOUT)"
output = self.shell.run_cell_magic(
magic_name="timeit", line="-q -o import subprocess", cell=stmt)
output = str(output) # convert TimeitResult object to human readable string
else:
output = subprocess.check_output(
[file_path + ".out"], stderr=subprocess.STDOUT)