RDK Documentation (Open Sourced RDK Components)
|
Class for AAMP event Profiling. More...
#include <AampProfiler.h>
Data Structures | |
struct | ProfilerBucket |
Data structure corresponding to profiler bucket. More... | |
class | TuneEvent |
Class corresponding to tune time events. More... | |
Public Member Functions | |
ProfileEventAAMP () | |
ProfileEventAAMP Constructor. | |
~ProfileEventAAMP () | |
ProfileEventAAMP Destructor. | |
ProfileEventAAMP (const ProfileEventAAMP &)=delete | |
Copy constructor disabled. More... | |
ProfileEventAAMP & | operator= (const ProfileEventAAMP &)=delete |
assignment operator disabled More... | |
void | SetBandwidthBitsPerSecondVideo (long bw) |
Setting video bandwidth in bps. More... | |
void | SetBandwidthBitsPerSecondAudio (long bw) |
Setting audio bandwidth in bps. More... | |
void | SetDrmErrorCode (int errCode) |
Setting DRM error code. More... | |
void | getTuneEventsJSON (std::string &outSS, const std::string &streamType, const char *url, bool success) |
Get tune time events in JSON format. More... | |
void | TuneBegin (void) |
Profiler method to perform tune begin related operations. More... | |
void | TuneEnd (TuneEndMetrics &mTuneendmetrics, std::string appName, std::string playerActiveMode, int playerId, bool playerPreBuffered, unsigned int durationSeconds, bool interfaceWifi, std::string failureReason) |
Logging performance metrics after successful tune completion. Metrics starts with IP_AAMP_TUNETIME. More... | |
void | GetClassicTuneTimeInfo (bool success, int tuneRetries, int firstTuneType, long long playerLoadTime, int streamType, bool isLive, unsigned int durationinSec, char *TuneTimeInfoStr) |
Method converting the AAMP style tune performance data to IP_EX_TUNETIME style data. More... | |
void | ProfileBegin (ProfilerBucketType type) |
Marking the beginning of a bucket. More... | |
void | ProfileError (ProfilerBucketType type, int result=-1) |
Marking error while executing a bucket. More... | |
void | ProfileEnd (ProfilerBucketType type) |
Marking the end of a bucket. More... | |
void | ProfilePerformed (ProfilerBucketType type) |
Method to mark the end of a bucket, for which beginning is not marked. More... | |
void | SetTuneFailCode (int tuneFailCode, ProfilerBucketType failBucketType) |
Method to set Failure code and Bucket Type used for microevents. More... | |
void | SetLogger (AampLogManager *logObj) |
Private Member Functions | |
unsigned int | effectiveBucketTime (ProfilerBucketType id1, ProfilerBucketType id2) |
Calculating effective time of two overlapping buckets. More... | |
Private Attributes | |
struct ProfileEventAAMP::ProfilerBucket | buckets [PROFILE_BUCKET_TYPE_COUNT] |
long long | tuneStartMonotonicBase |
long long | tuneStartBaseUTCMS |
long long | xreTimeBuckets [TuneTimeMax] |
long | bandwidthBitsPerSecondVideo |
long | bandwidthBitsPerSecondAudio |
int | drmErrorCode |
bool | enabled |
std::list< TuneEvent > | tuneEventList |
std::mutex | tuneEventListMtx |
ProfilerBucketType | mTuneFailBucketType |
int | mTuneFailErrorCode |
AampLogManager * | mLogObj |
Class for AAMP event Profiling.
Definition at line 145 of file AampProfiler.h.
struct ProfileEventAAMP::ProfilerBucket |
Data structure corresponding to profiler bucket.
Definition at line 178 of file AampProfiler.h.
|
delete |
Copy constructor disabled.
|
inlineprivate |
Calculating effective time of two overlapping buckets.
[in] | id1 | - Bucket type 1 |
[in] | id2 | - Bucket type 2 |
Definition at line 222 of file AampProfiler.h.
|
delete |
assignment operator disabled
|
inline |
Setting video bandwidth in bps.
[in] | bw | - Bandwidth in bps |
Definition at line 258 of file AampProfiler.h.
|
inline |
Setting audio bandwidth in bps.
[in] | bw | - Bandwidth in bps |
Definition at line 269 of file AampProfiler.h.
|
inline |
Setting DRM error code.
[in] | errCode | - Error code |
Definition at line 280 of file AampProfiler.h.
ProfileEventAAMP::getTuneEventsJSON | ( | std::string & | outSS, |
const std::string & | streamType, | ||
const char * | url, | ||
bool | success | ||
) |
Get tune time events in JSON format.
[out] | outSS | - Output JSON string |
[in] | streamType | - Stream type |
[in] | url | - Tune URL |
[in] | success | - Tune success/failure |
Definition at line 48 of file AampProfiler.cpp.
void ProfileEventAAMP::TuneBegin | ( | void | ) |
Profiler method to perform tune begin related operations.
Definition at line 94 of file AampProfiler.cpp.
void ProfileEventAAMP::TuneEnd | ( | TuneEndMetrics & | mTuneEndMetrics, |
std::string | appName, | ||
std::string | playerActiveMode, | ||
int | playerId, | ||
bool | playerPreBuffered, | ||
unsigned int | durationSeconds, | ||
bool | interfaceWifi, | ||
std::string | failureReason | ||
) |
Logging performance metrics after successful tune completion. Metrics starts with IP_AAMP_TUNETIME.
version, // version for this protocol, initially zero
build, // incremented when there are significant player changes/optimizations
tunestartUtcMs, // when tune logically started from AAMP perspective
ManifestDownloadStartTime, // offset in milliseconds from tunestart when main manifest begins download
ManifestDownloadTotalTime, // time (ms) taken for main manifest download, relative to ManifestDownloadStartTime
ManifestDownloadFailCount, // if >0 ManifestDownloadTotalTime spans multiple download attempts
PlaylistDownloadStartTime, // offset in milliseconds from tunestart when playlist subManifest begins download
PlaylistDownloadTotalTime, // time (ms) taken for playlist subManifest download, relative to PlaylistDownloadStartTime
PlaylistDownloadFailCount, // if >0 otherwise PlaylistDownloadTotalTime spans multiple download attempts
InitFragmentDownloadStartTime, // offset in milliseconds from tunestart when init fragment begins download
InitFragmentDownloadTotalTime, // time (ms) taken for fragment download, relative to InitFragmentDownloadStartTime
InitFragmentDownloadFailCount, // if >0 InitFragmentDownloadTotalTime spans multiple download attempts
Fragment1DownloadStartTime, // offset in milliseconds from tunestart when fragment begins download
Fragment1DownloadTotalTime, // time (ms) taken for fragment download, relative to Fragment1DownloadStartTime
Fragment1DownloadFailCount, // if >0 Fragment1DownloadTotalTime spans multiple download attempts
Fragment1Bandwidth, // intrinsic bitrate of downloaded fragment
drmLicenseRequestStart, // offset in milliseconds from tunestart
drmLicenseRequestTotalTime, // time (ms) for license acquisition relative to drmLicenseRequestStart
drmFailErrorCode, // nonzero if drm license acquisition failed during tuning
LAPreProcDuration, // License acquisition pre-processing duration in ms
LANetworkDuration, // License acquisition network duration in ms
LAPostProcDuration, // License acquisition post-processing duration in ms
VideoDecryptDuration, // Video fragment decrypt duration in ms
AudioDecryptDuration, // Audio fragment decrypt duration in ms
gstStart, // offset in ms from tunestart when pipeline creation/setup begins
gstFirstFrame, // offset in ms from tunestart when first frame of video is decoded/presented
contentType, //Playback Mode. Values: CDVR, VOD, LINEAR, IVOD, EAS, CAMERA, DVR, MDVR, IPDVR, PPV
streamType, //Stream Type. Values: 10-HLS/Clear, 11-HLS/Consec, 12-HLS/Access, 13-HLS/Vanilla AES, 20-DASH/Clear, 21-DASH/WV, 22-DASH/PR
firstTune //First tune after reboot/crash
Prebuffered //If the Player was in preBuffer(BG) mode)
PreBufferedTime //Player spend Time in BG
success //Tune status contentType //Content Type. Eg: LINEAR, VOD, etc streamType //Stream Type. Eg: HLS, DASH, etc firstTune //Is it a first tune after reboot/crash.
[in] | mTuneendmetrics | - Tune End metrics values |
[in] | appName | - Application Name |
[in] | playerActiveMode | - Aamp Player mode |
[in] | playerId | - Aamp Player id |
[in] | playerPreBuffered | - True/false Player has pre bufferred content |
[in] | durationSeconds | - Asset duration in seconds |
[in] | interfaceWifi | - Active connection is Wifi or Ethernet |
[in] | failureReason | - Aamp player failure reason |
Definition at line 157 of file AampProfiler.cpp.
void ProfileEventAAMP::GetClassicTuneTimeInfo | ( | bool | success, |
int | tuneRetries, | ||
int | firstTuneType, | ||
long long | playerLoadTime, | ||
int | streamType, | ||
bool | isLive, | ||
unsigned int | durationinSec, | ||
char * | TuneTimeInfoStr | ||
) |
Method converting the AAMP style tune performance data to IP_EX_TUNETIME style data.
[in] | success | - Tune status |
[in] | tuneRetries | - Number of tune attempts |
[in] | playerLoadTime | - Time at which the first tune request reached the AAMP player |
[in] | streamType | - Type of stream. eg: HLS, DASH, etc |
[in] | isLive | - Live channel or not |
[in] | durationinSec | - Asset duration in seconds |
[out] | TuneTimeInfoStr | - Formatted output string |
Definition at line 242 of file AampProfiler.cpp.
void ProfileEventAAMP::ProfileBegin | ( | ProfilerBucketType | type | ) |
Marking the beginning of a bucket.
[in] | type | - Bucket type |
Definition at line 297 of file AampProfiler.cpp.
void ProfileEventAAMP::ProfileError | ( | ProfilerBucketType | type, |
int | result = -1 |
||
) |
Marking error while executing a bucket.
[in] | type | - Bucket type |
[in] | result | - Error code |
Definition at line 311 of file AampProfiler.cpp.
void ProfileEventAAMP::ProfileEnd | ( | ProfilerBucketType | type | ) |
Marking the end of a bucket.
[in] | type | - Bucket type |
Definition at line 325 of file AampProfiler.cpp.
void ProfileEventAAMP::ProfilePerformed | ( | ProfilerBucketType | type | ) |
Method to mark the end of a bucket, for which beginning is not marked.
[in] | type | - Bucket type |
Definition at line 354 of file AampProfiler.cpp.
ProfileEventAAMP::SetTuneFailCode | ( | int | tuneFailCode, |
ProfilerBucketType | failBucketType | ||
) |
Method to set Failure code and Bucket Type used for microevents.
[in] | tuneFailCode | - tune Fail Code |
[in] | failBucketType | - Profiler Bucket type |
Definition at line 363 of file AampProfiler.cpp.
|
private |
Base time from Monotonic clock for interval calculation
Definition at line 200 of file AampProfiler.h.
|
private |
common UTC base for start of tune
Definition at line 202 of file AampProfiler.h.
|
private |
Start time of each buckets for classic metrics conversion
Definition at line 203 of file AampProfiler.h.
|
private |
Video bandwidth in bps
Definition at line 204 of file AampProfiler.h.
|
private |
Audio bandwidth in bps
Definition at line 205 of file AampProfiler.h.
|
private |
DRM error code
Definition at line 206 of file AampProfiler.h.
|
private |
Profiler started or not
Definition at line 207 of file AampProfiler.h.
|
private |
List of events happened during tuning
Definition at line 208 of file AampProfiler.h.
|
private |
Mutex protecting tuneEventList
Definition at line 209 of file AampProfiler.h.
|
private |
ProfilerBucketType in case of error
Definition at line 211 of file AampProfiler.h.
|
private |
tune Fail Error Code
Definition at line 212 of file AampProfiler.h.