How exactly averaging is performed in the diode sensor based power meter?
I guess you're referring to an RF Power meter like this:



The sensor is in a probe that you connect to this "base unit".

The signal from the diode, representing the power level, is fed into this unit and measured by an ADC (Analog to Digital) converter.

As the data is then in a digital format, averaging is easy as you can simply calculate the mathematical average value. This is very likely done in software (the firmware running inside the base unit) as that is the easiest and most flexible. Flexible as in that you can easily vary the amount of samples over which the average is calculated.