diff --git a/compiler/profile_stats.py b/compiler/profile_stats.py new file mode 100755 index 00000000..d3c33801 --- /dev/null +++ b/compiler/profile_stats.py @@ -0,0 +1,5 @@ +import pstats +p = pstats.Stats('profile.dat') +p.strip_dirs() +p.sort_stats('cumulative') +p.print_stats(50) diff --git a/compiler/run_profile.sh b/compiler/run_profile.sh new file mode 100755 index 00000000..1b8df3ae --- /dev/null +++ b/compiler/run_profile.sh @@ -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" diff --git a/compiler/view_profile.py b/compiler/view_profile.py new file mode 100755 index 00000000..5a522b8a --- /dev/null +++ b/compiler/view_profile.py @@ -0,0 +1,6 @@ +import pstats +p = pstats.Stats(‘profile.dat’) +p.strip_dirs() +p.sort_stats(‘cumulative’) +p.print_stats(50) +