It's already built-in.
Check out the system view pg_stat_user_functions
http://www.postgresql.org/docs/current/static/monitoring-stats.html#PG-STAT-USER-FUNCTIONS-VIEW
Note that you need to enable that in your postgresql.conf
:
http://www.postgresql.org/docs/current/static/monitoring-stats.html#MONITORING-STATS-SETUP
To reset the collected statistics, use pg_stat_reset()
:
http://www.postgresql.org/docs/current/static/monitoring-stats.html#MONITORING-STATS-FUNCTIONS