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)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vchang, Assigned: gavin09)
References
Details
Attachments
(2 files, 8 obsolete files)
No description provided.
Comment 1•11 years ago
|
||
record screen brightness and a timestamp to estimate the power consumption of screen
Attachment #771278 -
Flags: feedback?(vchang)
Comment 2•11 years ago
|
||
Attachment #771278 -
Attachment is obsolete: true
Attachment #771278 -
Flags: feedback?(vchang)
Comment 3•11 years ago
|
||
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)
Comment 4•11 years ago
|
||
Implement a clock_gettime function in timeService to help each component obtains the clock time.
Attachment #780804 -
Flags: feedback?(vchang)
Reporter | ||
Comment 5•11 years ago
|
||
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-
Reporter | ||
Comment 6•11 years ago
|
||
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)
Comment 7•11 years ago
|
||
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)
Comment 8•11 years ago
|
||
Fix bugs.
Attachment #784906 -
Attachment is obsolete: true
Attachment #784906 -
Flags: feedback?(vchang)
Attachment #786254 -
Flags: feedback?(vchang)
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → glai
Updated•11 years ago
|
Comment 9•11 years ago
|
||
Attachment #786254 -
Attachment is obsolete: true
Attachment #786254 -
Flags: feedback?(vchang)
Attachment #793929 -
Flags: feedback?(vchang)
Comment 10•11 years ago
|
||
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)
Reporter | ||
Updated•11 years ago
|
Attachment #793929 -
Flags: feedback?(vchang) → feedback+
Updated•11 years ago
|
Assignee: glai → gavin09
Updated•11 years ago
|
Attachment #793929 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #793931 -
Attachment is obsolete: true
Attachment #793931 -
Flags: feedback?(vchang)
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Comment 12•11 years ago
|
||
Updated•10 years ago
|
Blocks: b2g-metering-usage
Comment 13•7 years ago
|
||
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.
Description
•