Good question. A video will answer that question in two weeks.
To be brief for now, converted kinetic energy of gun going off mounted to a frictionless sled to potential energy. Measured the h (units of inches), inserted into equation PE=mgh, while knowing mg to be the weight of the sled, rifle, and comp. KE=PE in units of in-lb. in-lb is the figure of merit.