Add profile scripts

This commit is contained in:
Matt Guthaus 2018-12-07 08:56:40 -08:00
parent 537e0689fb
commit a96f492d0a
3 changed files with 14 additions and 0 deletions

5
compiler/profile_stats.py Executable file
View File

@ -0,0 +1,5 @@
import pstats
p = pstats.Stats('profile.dat')
p.strip_dirs()
p.sort_stats('cumulative')
p.print_stats(50)

3
compiler/run_profile.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
python3 -m cProfile -o profile.dat ./openram.py example_config_scn4m_subm.py -v
echo "Run view_profile.py to view results"

6
compiler/view_profile.py Executable file
View File

@ -0,0 +1,6 @@
import pstats
p = pstats.Stats(profile.dat)
p.strip_dirs()
p.sort_stats(cumulative)
p.print_stats(50)