Add performance tracing facility

Followup to pull request #38 which got closed by dropping the devel branch.