Report 2: Coding Week 2

Progress

  • Worked on a draft pull request, that involves rudimentary parts of the plugin monitor. Link
  • Changed the previous approach, to avoid recreating a plugin list, instead created an object that contains process ids as keys and resource metrics as values, this object is updated in intervals.
  • Tested the new approach and obtained coherent resource usage data in the react app.

Plans

  • Looking into the alert system and testing alerts for excessive resource usage.
  • Deciding the UI. As for now, I have little preference, so probably will go with whatever community prefers:
    • Whether the config screen will have the plugin monitor?
    • If yes, then will it have the resources displayed along each plugin, or will there be a separate screen
    • Does it need graphs/charts for visualisation?

Problems

  • A problem that was not solved from previous week, so requoting it:

    I could not figure out how to make my test plugin use a certain (relatively large) amount of memory for a long time, as any unused variable is likely being deallocated by the garbage collector. I tried to loop over a large array of strings to prevent this, however, infinite looping eventually crashes my device by using too much CPU.

but why is it important to do this? I don't really understand how it's related to the project, since you can inspect a process memory in any case.

If you do need to do this, what did you try so far? Surely there are plenty of options to fill up memory

but why is it important to do this? I don't really understand how it's related to the project, since you can inspect a process memory in any case.

This is required for testing the alerts/notifications. Most of the plugins that are available use a steady amount of memory and have little/no spikes in resource usage that can be reliably reproduced.

It seems like a basic thing that could be asked on StackOverflow to be honest. Just load some huge files in memory and you'll quickly get there. If you can't load files, create a huge string in js file and then load it multiple time in an array.

Alerts are not such high priority anyway. Getting your system to correctly list plugins, their name, memory and CPU usage is more important, then displaying this info in a useful way.

1 Like