1

I want to store my pytest benchmark results into a excel file, anyone knows how to do it?

python
import pytest
import pytest-benchmark

def fun():
   print("Defines a function")

test_funct():
    result = benchmark.pedantic(fun, args=(,), iterations=1, rounds=10)
    assert result == 0

I run above test using command 
python3 -m pytest ./filename.py



If I use --benchmark-autosave it stores the result in json format, I want to store the result in excel or csv format

pbalakka
  • 11
  • 2
  • 2
    As `pytest-benchmark` does not provide this, you have to convert the json to csv or Excel afterwards - see for example [How can I convert JSON to CSV?](https://stackoverflow.com/questions/1871524/how-can-i-convert-json-to-csv). – MrBean Bremen Jun 15 '20 at 18:25
  • Thank you MrBean Bremen – pbalakka Jun 17 '20 at 16:56

0 Answers0