Pentax D-LI109 test
Using AA batteries was very convenient, but newer Pentax cameras use special rechargable Lithium-ion batteries. D-LI109 can be used in several Pentax bodies ( K-R, K-S1, K-S2, K-30, K-50, K-70, K-500, ... ).
The original D-LI109 is quite expensive, approx. $50-$60. Replacement batteries are much cheaper, I bought 2 VHBW batteries at ebay for $20 total (including shipping). I wanted the test the batteries and compare the original and the replacement.


Test - PkTriggerCord
First I was looking for a way to test the batteries without taking lots of useless images.
I was using pktriggercord (my Pentax tethering software) after I connected the camera to the computer using an USB cable. The program can read battery voltage. It returns two values (V1 and V2), even the well-known exiftool calls these value simply voltage1, voltage2. Probably these are the unloaded and the loaded voltages (V1 > V2 is always true).
The program read the camera status twice every minute, the camera was doing nothing else. I was testing freshly charged batteries. Brand new ones, I was charging/discharging the batteries only once or twice.
Of course this method does not test quite a few things: What will happen after 100 charge/discarge cycles? What is the temperature is extremely low...
It took 6 hours and 15 minutes for the original battery to deplete. I only took 4 hours 42 minutes for the VHBW battery. I've created a graph (using gnuplot) to show the voltage change during the test.

Test - Photos
In this test I was using an external remote control and I took pictures using 30 second delays. I read the battery info using exiftool.
I was testing freshly charged batteries, not brand new ones.
It took 5 hours and 30 minutes for the original battery to deplete. I only took 4 hours 8 minutes for the VHBW battery. I've created a graph (using gnuplot) to show the voltage change during the test.

Results
To summerize the results:
- The battery is depleted when V2 (loaded voltage) goes bellow 6.79V.
- The original battery lasts longer.
- The difference is even bigger than I expected based on the 7.8 Wh - 6.5 Wh difference.
- The price difference is even greater, it is still better (unless we really want to replace the battery less often) to buy 5-6 replacement batteries instead of one original.