I am using the VOLTCRAFT VC130 multimeter for measurement of current through my esp32. The microcontroller runs perfectly with two 1.5V batteries(~3V as read by multimeter in voltage mode). But when I put the multimeter in current mode between power supply(batteries) and esp32 in series for the monitoring the current. The brownout detector triggers. The brownout voltage level is 2.43 V +/- 0.05 for the esp32.
To prevent this problem you select a small value resistor to put in place of where you are at present trying to place the multimeter for the current measurement. Then use the meter in voltage mode to measure the voltage drop across the resistor. Using Ohm's law you can compute current from voltage divided by resistance.
The meter internally uses this same technique in the current mode. However at whatever current range you were using the meter's internal resistance is high enough that the net voltage drop is sending the MCU into the brown landing zone.
Another technique that can be used is to power the unit from an adjustable bench power supply where you can tweak up the source voltage slightly to compensate some for the drop for a series multimeter in current mode. Care must be taken with this though to avoid running your target device at a voltage above its ratings.
This meter can read down to 200uA full scale or 400mV full scale.
That means it uses 400m/200u=2k series resistor for the lowest scale so when it comes out of sleep mode you get a Brown Out.
If your IoT device spends more time sleeping, you could also put a large e-cap across the meter in the mA range to average current. But dV = Ic*dt/C so depending how long pulse current = Ic and duration dt= and value of Cap, C determines the change in dV needed to prevent brown out.
I can think of two reasons why you may want to measure current: you worry about what the peak current is and whether your batteries can provide it, or you want to know if how long your batteries will last. Now, bear in mind that power consumption of such devices can vary a lot depending on whether and how often they are transmitting, but also what kind of operations they are performing. For a fun activity, write a tight loop that does nothing, and compare it with a tight loop that writes to flash (sequentially, and not for long, or you'll kill your flash), and compare the power drawn. But I digress.
Anyway, if you are interested in the instantaneous current draw during the wake cycle at a higher temporal resolution than your voltmeter will show you, use the same technique as Michael Karas suggested, but hook up your oscilloscope across the shunt (needless to say, if your scope does not have an isolated ground, use two channels in differential mode).
To see how long your batteries will last, just put in a fresh set and let them run until they die. I know it sounds silly, but you'll get more reliable results this way. Of course, if you are aiming for multi-year battery life with very long sleep cycles, this won't quite work :)
While we are at it: the two easiest ways of reducing the power consumption are to limit the maximum transmission power (there are API calls fro that) and also lower the clock rate.
I assume by your statement that you are using two 1.5V batteries that you are not using one of the breakout boards with the built-in regulator, but that you are feeding 3V to the module directly, correct?