Review of "Power Tracker" version 16

Details Page Preview

GNOME PowerTracker is a simple application that helps users monitor their power consumption on GNOME-based systems. Does not use any dependencies Autodetects any battery that has a representation in /sys/class/power_supply You can configure refresh rate and if 0.0W values should be hidden (to avoid screen clutter) IMPORTANT. This will only work with laptops. Afaik there's no simple way to track desktop power consumption Power when fully charged is 0W Power when charging has a plus sign Power when discharging has a minus sign If you have any issue, please report it so I can take a look at it! Enjoy!

Extension Homepage
https://github.com/Pijuli/GnomePowerTracker

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 2

Shexli found 2 issues that may need reviewer attention.

EGO-A-004 warning

extension files should not contain excessive ungated console logging

File contains 6 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • extension.js:108
    console.error(`Failed to update power label: ${error}`)
  • extension.js:135
          console.error(
            `Failed to read information from ${POWER_SUPPLY_CLASS_DIR}: ${e}`,
          )
  • extension.js:205
            console.error(
              `Failed to read information for ${batDirInfo.get_name()}: ${e}`,
            )
  • extension.js:221
    console.error(`Failed to get power data: ${error}`)
  • extension.js:280
    console.log(`New setting: enable_debug_logs=${this.enable_debug_logs}`)
  • extension.js:305
    console.log(...str)

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:84
        this._settings.connect('changed::enabledebuglogs', (settings, key) => {
          this.set_enable_debug_logs(this._settings.get_boolean(key));
          this.debug_log(`>>>>>>>>>>> Enable debug_logs now set to ${String(this.enable_debug_logs)}`)
        })
  • extension.js:74
        this._settings.connect("changed::refreshrate", (settings, key) => {
          this.set_refreshrate(this._settings.get_int(key));
          this.debug_log(`>>>>>>>>>>> Refreshrate changed to ${String(this.refreshrate)}`);
        })
  • extension.js:79
        this._settings.connect('changed::showzeropower', (settings, key) => {
          this.set_show_zero_power(this._settings.get_boolean(key));
          this.debug_log(`>>>>>>>>>>> Show Zero Power now set to ${String(this.show_zero_power)}`)
        })

All Versions

Previous Reviews on this Version

fmuellner active