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

Commit 978dcac6 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioFlinger: Update namespace for Statistics"

parents 1441fdc2 16698b8c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -92,9 +92,9 @@ void FastMixerDumpState::dump(int fd) const
    }
    // statistics for monotonic (wall clock) time, thread raw CPU load in time, CPU clock frequency,
    // and adjusted CPU load in MHz normalized for CPU clock frequency
    Statistics<double> wall, loadNs;
    audio_utils::Statistics<double> wall, loadNs;
#ifdef CPU_FREQUENCY_STATISTICS
    Statistics<double> kHz, loadMHz;
    audio_utils::Statistics<double> kHz, loadMHz;
    uint32_t previousCpukHz = 0;
#endif
    // Assuming a normal distribution for cycle times, three standard deviations on either side of
@@ -152,7 +152,7 @@ void FastMixerDumpState::dump(int fd) const
        qsort(tail, n, sizeof(uint32_t), compare_uint32_t);
        // assume same number of tail samples on each side, left and right
        uint32_t count = n / kTailDenominator;
        Statistics<double> left, right;
        audio_utils::Statistics<double> left, right;
        for (uint32_t i = 0; i < count; ++i) {
            left.add(tail[i]);
            right.add(tail[n - (i + 1)]);
+2 −2
Original line number Diff line number Diff line
@@ -335,9 +335,9 @@ public:
#ifdef DEBUG_CPU_USAGE
private:
    ThreadCpuUsage mCpuUsage;           // instantaneous thread CPU usage in wall clock ns
    Statistics<double> mWcStats;        // statistics on thread CPU usage in wall clock ns
    audio_utils::Statistics<double> mWcStats; // statistics on thread CPU usage in wall clock ns

    Statistics<double> mHzStats;        // statistics on thread CPU usage in cycles
    audio_utils::Statistics<double> mHzStats; // statistics on thread CPU usage in cycles

    int mCpuNum;                        // thread's current CPU number
    int mCpukHz;                        // frequency of thread's current CPU in kHz