I'm tinkering with a simple heat engine and I want to experimentally measure its work output. The engine pushes a piston once per test, and I know the work done is on the order of 1 kilojoule. The problem is that the engine does the work on the order of milliseconds, but depending on the configuration that duration of work could vary by an order of magnitude. Therefore in order to measure total work per test I can't just use a spring to look at the peak force exerted because the duration is not only very short but also can vary significantly. Also the work done per test might vary by a factor of 2 or 3 depending on other variables, so I can't assume work done is constant between tests. I hope to find a way to measure work done per test with an error of less than 5%. What is the simplest mechanism -- gauge, or otherwise -- that I could construct or employ to measure joules output by this engine?