BetterBatteryStats icon indicating copy to clipboard operation
BetterBatteryStats copied to clipboard

Wrong stats

Open gaich opened this issue 7 years ago • 10 comments

Hi, Sven! I have missed the repository and put an issue to asksven/BetterBatteryStats-Knowledge-Base. Is it possible to transfer it here, or should I open another one?

gaich avatar Feb 17 '18 15:02 gaich

Unfortunately there is no way to move issues between projects I know of so you may want to re-add it here

asksven avatar Feb 17 '18 16:02 asksven

Using an MTK phone running Nougah, 214 BBS test version. It seems that statistics regarding alarms and network is wrong. Instead of showing custom-current is probably uses raw stats. And there`s no CPU data.

BetterBatteryStats-2018-02-08_063051513.txt

35957684-e8f65c98-0cad-11e8-895f-d7bcf3b1d7a1

This is raw stats: 35957703-fec003a8-0cad-11e8-8df8-1b2a64421dae

And these are GSAM Battery monitor screenshots, I think this data may be correct: 35957744-413849fc-0cae-11e8-8704-54fc2409a112

Apps in general: 35957765-5672c158-0cae-11e8-8290-07b45c394873

Awake time: 35957776-67a6f0de-0cae-11e8-8c66-e9dc4331ff87

Alarms: 35957784-739520b4-0cae-11e8-8bce-1fabbd72fb6c

Network: 35957795-81e979d0-0cae-11e8-802f-aee8f86e8c05

KWL: 35957808-92fd36b2-0cae-11e8-8eb3-5d97284d1aa7

Amplify data for this period: 35957849-bbda2108-0cae-11e8-816e-8378eed4088b 35957850-bbf70e26-0cae-11e8-88de-065eda0a2404 35957851-bc128aa2-0cae-11e8-940c-77196ce2d955

Some system files, if they are useful: 1.ZIP

Some more - I have disabled some unactive services and receivers in BBS, but I have tried to turn them back - no result. 35957923-209060f8-0caf-11e8-90e2-519e88b20d4f 35957924-20ad9150-0caf-11e8-9887-101eef78536d

Please, take a look when you have some time. It is not urgent, just interesting, what is going on. Thank you.

gaich avatar Feb 17 '18 17:02 gaich

Last beta seems to display right statistics. The refreshing time is instant, instead of previous versions, maybe this was the reason? But still without CPU. And why is it showing KWL using API, I didn`t chek this in settings? BetterBatteryStats-2018-02-18_074122403.txt

gaich avatar Feb 18 '18 05:02 gaich

KWL is automatically going back to API when the wakelock files can not be read from the file-system. In regards to CPU, could you please provide a logcat? The dumpfile shows that there are samples so I can only guess there is a problem in computing the difference between "current" and "custom"

asksven avatar Feb 18 '18 09:02 asksven

Will this be enough or should I make it after an idle period, like the dump: logcat-2018-02-18_142703370.txt dmesg-2018-02-18_142703452.txt

gaich avatar Feb 18 '18 11:02 gaich

I don't seen anything in that log. Please turn on debug logging in the advanced prefs and go to raw cpu states first, then on the normal screen.

You can check if that was captured in the logcat by searching for: Processing CPU States from <-- if this appears the event was captured

asksven avatar Feb 18 '18 12:02 asksven

These words are present here: logcat-2018-02-18_155252454.txt

gaich avatar Feb 18 '18 12:02 gaich

Interesting, the log shows:

02-18 15:52:52.418 D/StatsProvider( 6938): Processing CPU States from ref_custom to ref_current
02-18 15:52:52.418 D/StatsProvider( 6938): Reference used: Reference ref_custom created 2 d 23 h 56 m 2 s  (Wl: 27 elements; KWl: 46elements; NetS: 54 elements; Alrm: 13 elements; Proc: 289 elements; Oth: 19 elements; Sensors: 7 elements; 7 elements)
02-18 15:52:52.419 D/StatsProvider( 6938): It is now 2018-02-18 15:52:52
02-18 15:52:52.419 D/StatsProvider( 6938): Substracting []
02-18 15:52:52.419 D/StatsProvider( 6938): from []

Note the Substracting [] from []. That basically says there is no data to process.

As the data comes from /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state could you please check if this file exists and if this file is world readable?

asksven avatar Feb 18 '18 18:02 asksven

In /sys/devices/system/cpu/cpu0/cpufreq there are no subfolders at all and no such files. screenshot_20180218-212044

It is in /sys/devices/system/cpu/cpufreq: screenshot_20180218-212326 screenshot_20180218-212356 screenshot_20180218-212405

gaich avatar Feb 18 '18 18:02 gaich

Interesting. Seems you just delivered the solution to add the new feature from #192 :) Will do in 2.4

asksven avatar Feb 25 '18 17:02 asksven