Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9484bae0 authored by Sanna Catherine de Treville Wager's avatar Sanna Catherine de Treville Wager
Browse files

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
parent da4ca5f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment