record performance data and retrieve data from MongoDB