Add ability to track timing metrics for writing and rotate the db.