Meet the ZS1100A Power Meter: a USB-based power supply that can estimate the energy consumption of IoT devices. It can plot the current consumption vs. time that can be used to estimate overall battery health. It has a free GUI with waveform analysis tools. That can be exported sigrok/PulseView for UART, SPI, I²C protocol analysis or as ASCII in XML.
This tool has 6 digital inputs, 2 GND pins, and 1 VCC pin. It has an internal temperature monitor to automatically shut the unit down in case of overheating.