Files
android/libwvdrmengine/cdm/profiler/include/call_table.h
Aaron Vaage 0d77fecfb5 OEMCrypto Profiler - Merge of Widevine Updates
This change is a merge of the following changes:
1. Remove MultipleSessions (go/wvgerrit/16763)
2. Increase Memory Budget (go/wvgerrit/16764)
3. Fixing Possible Integer Overflow (go/wvgerrit/16765)
4. Creating Call Table (go/wvgerrit/16766)
5. Creating Call History (go/wvgerrit/16767)
6. Connecting Profiled Scope (go/wvgerrit/16768)
7. Adding Call Table Version Number (go/wvgerrit/16780)
8. Add Version Number to Call History (go/wvgerrit/16781)

bug: 27157796

Change-Id: Ia3f088a1714f3f5b426fee6141daa4ea8d832cf4
2016-02-13 00:27:09 +00:00

50 lines
822 B
C++

#ifndef WVCDM_PROFILER_CALL_TABLE_H_
#define WVCDM_PROFILER_CALL_TABLE_H_
#include <map>
#include <stdint.h>
#include <vector>
namespace wvcdm {
namespace oemprofiler {
class CallTable {
public:
class Row {
public:
Row();
void Add(uint64_t sample);
uint64_t GetSampleSize() const;
uint64_t GetMin() const;
uint64_t GetMax() const;
double GetMean() const;
double GetVariance() const;
private:
uint64_t min_;
uint64_t max_;
uint64_t sample_size_;
double mean_;
double variance_m_;
double variance_s_;
};
const Row* LookUp(uint64_t row_id) const;
void Write(uint64_t row_id, uint64_t sample);
void Read(std::vector<uint8_t>& output) const;
private:
std::map<uint64_t, Row> map_;
};
} // namespace oemprofiler
} // namespace wvcdm
#endif