Review of "Astra Monitor" version 40 (57)

Details Page Preview

Astra Monitor is a cutting-edge, fully customizable, and performance-focused system monitoring extension for GNOME's top bar. It's an all-in-one solution for those seeking to keep a close eye on their system's performance metrics like CPU, GPU, RAM, disk usage, network statistics, and sensor readings.

Extension Homepage
https://github.com/AstraExt/astra-monitor

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 4

Shexli found 4 issues that may need reviewer attention.

EGO-X-004 warning

extensions should avoid synchronous file IO in shell code

Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.

File Operations

  • src/processor/processorMonitor.js:289
    GLib.file_get_contents('/sys/devices/system/cpu/present')
  • src/processor/processorMonitor.js:347
    GLib.file_get_contents('/proc/cpuinfo')
  • src/storage/storageMonitor.js:406
    GLib.file_get_contents(`/sys/block/${device}/queue/hw_sector_size`)
  • src/utils/utils.js:322
    GLib.file_get_contents('/proc/stat')
  • src/utils/utils.js:331
    GLib.file_get_contents('/proc/cpuinfo')
  • src/utils/utils.js:340
    GLib.file_get_contents('/proc/meminfo')
  • src/utils/utils.js:349
    GLib.file_get_contents('/proc/diskstats')
  • src/utils/utils.js:358
    GLib.file_get_contents('/proc/net/dev')
  • src/utils/utils.js:512
    GLib.file_get_contents('/sys/devices/system/cpu/present')
  • src/utils/utils.js:519
    GLib.file_get_contents(path)
  • src/utils/utils.js:1170
    GLib.file_get_contents('/proc/uptime')
  • src/utils/utils.js:1528
    file.load_contents(null)

EGO-X-002 warning

extensions should not use synchronous subprocess APIs in shell code

Shell code should avoid synchronous subprocess APIs like `GLib.spawn_command_line_sync()` and `GLib.spawn_sync()`.

Complete Examples

  • src/processor/processorMonitor.js:310
    GLib.spawn_command_line_sync(`${path}lscpu`)
  • src/utils/utils.js:309
    GLib.spawn_command_line_sync(path + fullCommand)
  • src/utils/utils.js:533
    GLib.spawn_command_line_sync('ps -V')
  • src/utils/utils.js:825
    GLib.spawn_command_line_sync(`${path}sensors -j`)
  • src/utils/utils.js:968
    GLib.spawn_command_line_sync(`${path}lspci -nnk`)
  • src/utils/utils.js:1237
    GLib.spawn_command_line_sync(`${path}lsblk -J -o ID,NAME,LABEL,MOUNTPOINTS,PATH`)
  • src/utils/utils.js:1619
    GLib.spawn_command_line_sync(`${path}ip -d -j addr`)
  • src/utils/utils.js:1808
    GLib.spawn_command_line_sync(`${commandPath}lsblk -Jb -o ID,UUID,NAME,KNAME,PKNAME,LABEL,TYPE,SUBSYSTEMS,MOUNTPOINTS,VENDOR,MODEL,PATH,RM,RO,STATE,OWNER,SIZE,FSUSE%,FSTYPE`)
  • src/utils/utils.js:2199
    GLib.spawn_command_line_sync('which nethogs')
  • src/utils/utils.js:2210
    GLib.spawn_command_line_sync(`getcap ${nethogs}`)

EGO-L-004 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • src/utils/cancellableTaskManager.js:27
                this.timeoutId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
                    try {
                        this.boundTask()
                            .then(resolve)
                            .catch(reject)
                            .finally(() => {
                            this.rejectFn = und

EGO-L-006 warning

preferences classes should not retain window-scoped objects on instance fields without close-request cleanup

Preferences code stores window-scoped objects on the exported prefs class without `close-request` cleanup.

Destroy all objects

  • prefs.js:99
    this.welcome = new Welcome(this)
  • prefs.js:100
    this.profiles = new Profiles(this)
  • prefs.js:101
    this.visualization = new Visualization(this)
  • prefs.js:102
    this.processors = new Processors(this)
  • prefs.js:103
    this.gpu = new Gpu(this)
  • prefs.js:104
    this.memory = new Memory(this)
  • prefs.js:105
    this.storage = new Storage(this)
  • prefs.js:106
    this.network = new Network(this)
  • prefs.js:107
    this.sensors = new Sensors(this)
  • prefs.js:108
    this.utility = new Utility(this, window)

All Versions

Version Status
40 (57) Active
39 (56) Active
38 (55) Active
37 (54) Active
36 (53) Active
35 (52) Active
34 (51) Active
33 (50) Active
32 (49) Active
31 (48) Active
30 (47) Active
29 (46) Active
28 (45) Active
27 (44) Active
26 (43) Active
25 (42) Active
24 (41) Active
24 (40) Rejected
24 (39) Inactive
23 (38) Active
23 (37) Rejected
22 (36) Active
21 (35) Active
21 (34) Inactive
21 (33) Rejected
21 (32) Rejected
20 (31) Rejected
19 (30) Active
18 (29) Active
18 (28) Inactive
17 (27) Active
16 (26) Inactive
16 (25) Rejected
15 (24) Active
14 (23) Active
14 (22) Rejected
14 (21) Rejected
13 (20) Active
12 (19) Active
11 (18) Active
10 (17) Inactive
10 (16) Rejected
10 (15) Rejected
10 (14) Rejected
9 (13) Active
9 (12) Inactive
8 (11) Active
7 (10) Active
7 (9) Rejected
6 (8) Active
5 (7) Active
4 (6) Active
3 (5) Active
2 (4) Active
1 (3) Active
2 Inactive
1 Rejected

Previous Reviews on this Version

JustPerfection rejected
Fix all the issues mentioned in shexli and send it again. The I'll review it.
JustPerfection active
Approved as we had a discussion on GNOME Matrix channel that these issues will be fixed for the next version.