This contraption is a Belgian Percussion Eprouvette. Back in the days when blackpowder was of dubious quality, devices like these were used to test the potency of the powder at hand. The barrel plug is attached to a V shaped spring. When fired the spring compresses moving a slider. The strength can then be read off a scale. I am not if the units on the scale correspond to the energy of the powder, or if it is just used for comparative purposes.
This particular Percussion Eprouvette is housed in the National Firearms Museum’s Robert E. Petersen gallery.
[ Many thanks to Nic Jenzen-Jones for emailing us the link. ]