Closed Bug 854208 Opened 12 years ago Closed 7 years ago

[Per app power metering] - Calculate Screen usage per process

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vchang, Assigned: gavin09)

References

Details

Attachments

(2 files, 8 obsolete files)

No description provided.
Blocks: 854200
Attached patch Screen power consumption estimation (obsolete) (deleted) — Splinter Review
record screen brightness and a timestamp to estimate the power consumption of screen
Attachment #771278 - Flags: feedback?(vchang)
Attached patch Screen power consumption estimation (obsolete) (deleted) — Splinter Review
Attachment #771278 - Attachment is obsolete: true
Attachment #771278 - Flags: feedback?(vchang)
Attached patch Screen power consumption estimation (obsolete) (deleted) — Splinter Review
Get clock time via timeService when setting screen brightness. PowerStatsService measures the duration of the screen brightness to estimate the power consumption.
Attachment #778287 - Attachment is obsolete: true
Attachment #780803 - Flags: feedback?(vchang)
Attached patch clock_gettime implementation (obsolete) (deleted) — Splinter Review
Implement a clock_gettime function in timeService to help each component obtains the clock time.
Attachment #780804 - Flags: feedback?(vchang)
Comment on attachment 780804 [details] [diff] [review] clock_gettime implementation Review of attachment 780804 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/time/TimeService.cpp @@ +39,5 @@ > + const uint64_t convert = 1000000; > + clock_gettime(CLOCK_MONOTONIC, &t); > + *currTime = (uint64_t)((t.tv_sec)*1000000000LL + t.tv_nsec); > + // convert nano second to micro second > + *currTime = *currTime / convert; Please implement hal::GetClockTime() here rather than use the system call directly. These call should not be run in others platform. ::: dom/time/nsITimeService.idl @@ +15,5 @@ > /* Set the system time. > * > * The |aTimeInMS| argument is the time in milliseconds since the epoch. > */ > void set(in int64_t aTimeInMS); Please add comments here.
Attachment #780804 - Flags: feedback?(vchang) → feedback-
Comment on attachment 780803 [details] [diff] [review] Screen power consumption estimation Review of attachment 780803 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/power/PowerStatsService.jsm @@ +353,5 @@ > + if (index === "screen") { > + let brightness = value[1]; > + let timeStampInt = parseInt(timeStamp, DECIMAL); > + let startTime = systemPowerInfo[index].startTime; > + systemPowerInfo[index].time += (timeStampInt - startTime) * brightness; Can you explain the algorithm here ?
Attachment #780803 - Flags: feedback?(vchang)
Attached patch Screen power consumption estimation (obsolete) (deleted) — Splinter Review
Previous patch saves time in power info. This patch saves power consumption(mA) in power info.
Attachment #780803 - Attachment is obsolete: true
Attachment #780804 - Attachment is obsolete: true
Attachment #784906 - Flags: feedback?(vchang)
Attached patch Screen power consumption estimation (obsolete) (deleted) — Splinter Review
Fix bugs.
Attachment #784906 - Attachment is obsolete: true
Attachment #784906 - Flags: feedback?(vchang)
Attachment #786254 - Flags: feedback?(vchang)
Assignee: nobody → glai
No longer blocks: 854200
Depends on: 854200
Depends on: 902764
Attachment #786254 - Attachment is obsolete: true
Attachment #786254 - Flags: feedback?(vchang)
Attachment #793929 - Flags: feedback?(vchang)
Originally, PowerStatsService passively collect the timestamp. Once PowerStatsService receive the timestamp, PowerStatsService starts to calculating the power consumption. The power consumption information is not update to date if PowerStatsService does not receive a timestamp. So, we add updateSystemInfo function to support actively update screen power consumption before return information to Gaia.
Attachment #793931 - Flags: feedback?(vchang)
Attachment #793929 - Flags: feedback?(vchang) → feedback+
Assignee: glai → gavin09
Attachment #793929 - Attachment is obsolete: true
Attachment #793931 - Attachment is obsolete: true
Attachment #793931 - Flags: feedback?(vchang)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: