mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
710 B
710 B
icon | title | order |
---|---|---|
dot | Profiling | 79 |
To profile your pocketpy scripts, you can run main.exe
with --profile
flag.
For example, to profile test/test_math.py
, run
main.exe --profile test/test_math.py
This will output a JSON report file named profile_report.json
in the current directory,
which records the time spent for each line. To visualize the report, please install our VSCode extension.
https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy
With pocketpy VSCode extension, press F1
and type pocketpy: Load Line Profiler Report
,
select profile_report.json
and you will see a nice visualization of the profiling result.