Use end timestamp set in the future to query NetworkStats since boot
This is necessary to include the full active bucket in the stats. When computing active bucket stats, NetworkStats multiplies data by (end - activeBucketStart) / (now - activeBucketStart). This is done in NetworkStatsHistory#getValues which is called from NetworkStatsCollection#getSummary. In this formula end=min(endTime, now), where endTime is passed from StatsPullAtomService and now is the timestamp obtained later in NetworkStatsCollection#getSummary. This calculation takes place after reading stats. Test: manual Bug: 350037915 Flag: EXEMPT bugfix Change-Id: I161d321aa71eb49459acbe263e087e30f815378b
Loading
Please register or sign in to comment