Printing runtime statistics in JSON

async def get(self):
        """Printing runtime statistics in JSON"""

        context_data = self.get_context_data()
        context_data.update(getattr(self.request.app, "stats", {}))

        response = self.json_response(context_data)
        return response