Added functionality to retrieve metrics from the sqlite store