Prints one histogram of all data in recent history
A call to dumpsys media.log causes the program to read timestamp data from the circular buffer stored in local memory to a local data structure which stores this data in a compressed format. The current code is a temporary step towards the ultimate goal (described below). The timestamp data is turned into historgrams of a small, fixed size, and added to a vector of histograms. When the vector reaches a given number of histograms, the oldest one is popped. When dump() is called, all the short histograms are combined into one large one and printed. The advantage of this approach is to not delete data from memory until it is overwritten. Ultimately, this data structure should be a circular buffer. A second data structure should be added which keeps a more long-term analysis of the data. Test: dumpsys media.log Change-Id: I39c4818e7d1221d5023a4355b8b57fadd9451de5
Loading
Please register or sign in to comment