How does the Online Power Profiler for Wi-Fi tool calculate energy consumption

How does the Online Power Profiler for Wi-Fi tool calculate energy consumption, and is there a formula or document explaining its energy consumption calculation principle?

For example, the transmission time of each WiFi packet and the power consumption of each transmission. as some blogs show in theory:

Related