How to check the preformance of the device a single time

Hello, the title pretty much says everything

I am trying to optomize my game and I need to check the preformance of the device a single time. Unlike most of those FPS scripts that constantly check the FPS, I only want to check it a single time for specific actions like when they click a button.

Remember, I am not trying to get FPS, I am trying to get preformance. Whatever the best way to track how well their device handles my game is what I am going for.

Currently I am using

local stat = game:GetService("Stats"):GetTotalMemoryUsageMb()

but I am not sure whether this accurately detects the preformance of the device. (like if they are at school or on the bus, lower the graphics automatically.)