BetterBatteryStats icon indicating copy to clipboard operation
BetterBatteryStats copied to clipboard

[feature] suggestions for deleted_wakelock

Open asksven opened this issue 11 years ago • 1 comments

Whenever deleted wakelock appears suggest the list of potential wakelocks that may have been aggregated by checking what wakelocks were in the 'from' list and not present in the 'to' list anymore

asksven avatar Aug 22 '13 18:08 asksven

I would suggest that all existing references between 'from' and 'to' are checked for KWL names, and not just the 2 being compared. Example: From=Boot, To=Current At boot WiFi was off. Currently WiFi is off If there are references in between where the WiFi KWLs exist (perhaps on screen off, etc.) then the chances of identifying additional candidates will increase - even though it will never possible to catch them all for sure.

On second thoughts, checks could extend to see not only distinct names in all intermediate refs, but also check entries that existed on a ref but not on the following one, even if it's not the final ref, and irrespective of whether that KWL exists on the final ref or not. Example: Boot - WiFi off Current - WiFi on There will probably be wlan_rx_... KWLs for the current reference, with certain values. But if in between boot and now the wifi was toggled several times, there will also be deleted_wake_locks. Checking intermediate references might identify "older" wlan_rx_... KWLs as having been grouped into deleted_wake_locks.

And something even further from this :) If from is not 'boot' but e.g. 'unplugged', it might even be possible to go back to previous references until the most recent 'boot' one is found, and that could be safely checked for created/deleted KWL entries, which will end up in the final reference anyway. Not sure if the metadata needed for this is on the db, though.

For this complexity, and if the overhead is not negligible, it might be better to have this list of candidates be computed on the fly only when requesting it - for instance when pressing the deleted_wake_locks entry on the KWL list.

Tungstwenty avatar Aug 22 '13 21:08 Tungstwenty