/**
* jbd line is:
* BATTERY_STATS_CHECKIN_VERSION, uid, which, "jbd",
- * jobsDeferredEventCount, jobsDeferredCount, averageLatencyMillis,
- * count at latency < 1 hr, count at latency < 2 hrs, count at latency < 6 hrs, beyond 6 hrs
+ * jobsDeferredEventCount, jobsDeferredCount, totalLatencyMillis,
+ * count at latency < 1 hr, count at latency 1 to 2 hrs, 2 to 4 hrs, 4 to 8 hrs, and past 8 hrs
* <p>
* @see #JOB_FRESHNESS_BUCKETS
*/
/**
* These are the thresholds for bucketing last time since a job was run for an app
* that just moved to ACTIVE due to a launch. So if the last time a job ran was less
- * than 30 minutes ago, then it's reasonably fresh, 2 hours ago, not so fresh and so
+ * than 1 hour ago, then it's reasonably fresh, 2 hours ago, not so fresh and so
* on.
*/
public static final long[] JOB_FRESHNESS_BUCKETS = {
1 * 60 * 60 * 1000L,
2 * 60 * 60 * 1000L,
- 6 * 60 * 60 * 1000L,
+ 4 * 60 * 60 * 1000L,
+ 8 * 60 * 60 * 1000L,
Long.MAX_VALUE
};
return;
}
final int deferredCount = mJobsDeferredCount.getCountLocked(which);
- final long averageLatency = deferredEventCount != 0
- ? mJobsFreshnessTimeMs.getCountLocked(which) / deferredEventCount
- : 0L;
+ final long totalLatency = mJobsFreshnessTimeMs.getCountLocked(which);
sb.append(deferredEventCount); sb.append(',');
sb.append(deferredCount); sb.append(',');
- sb.append(averageLatency);
+ sb.append(totalLatency);
for (int i = 0; i < JOB_FRESHNESS_BUCKETS.length; i++) {
if (mJobsFreshnessBuckets[i] == null) {
sb.append(",0");
return;
}
final int deferredCount = mJobsDeferredCount.getCountLocked(which);
- final long averageLatency = deferredEventCount != 0
- ? mJobsFreshnessTimeMs.getCountLocked(which) / deferredEventCount
- : 0L;
+ final long totalLatency = mJobsFreshnessTimeMs.getCountLocked(which);
sb.append("times="); sb.append(deferredEventCount); sb.append(", ");
sb.append("count="); sb.append(deferredCount); sb.append(", ");
- sb.append("avgLatency="); sb.append(averageLatency); sb.append(", ");
+ sb.append("totalLatencyMs="); sb.append(totalLatency); sb.append(", ");
for (int i = 0; i < JOB_FRESHNESS_BUCKETS.length; i++) {
sb.append("<"); sb.append(JOB_FRESHNESS_BUCKETS[i]); sb.append("ms=");
if (mJobsFreshnessBuckets[i] == null) {