Skip to content

Commit

Permalink
Merge pull request kaltura#11718 from kaltura/Rigel-18.11.0-AN-22830
Browse files Browse the repository at this point in the history
add vod play time metric
  • Loading branch information
olampert authored Aug 2, 2022
2 parents d3d52a4 + 3010663 commit e6367fe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions alpha/apps/kaltura/lib/reports/kKavaReportsMgr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class kKavaReportsMgr extends kKavaBase
const METRIC_QUARTILE_PLAY_TIME = 'sum_time_viewed';
const METRIC_VIEW_PERIOD_PLAY_TIME = 'sum_view_period';
const METRIC_LIVE_VIEW_PERIOD_PLAY_TIME = 'sum_live_view_period';
const METRIC_VOD_VIEW_PERIOD_PLAY_TIME = 'sum_vod_view_period';
const METRIC_AVG_PLAY_TIME = 'avg_time_viewed';
const METRIC_AVG_VIEW_PERIOD_PLAY_TIME = 'avg_view_period_time';
const METRIC_PLAYER_IMPRESSION_RATIO = 'load_play_ratio';
Expand Down Expand Up @@ -126,6 +127,7 @@ class kKavaReportsMgr extends kKavaBase
const METRIC_QUARTILE_PLAY_TIME_SEC = 'quartile_play_time';
const METRIC_VIEW_PERIOD_PLAY_TIME_SEC = 'view_period_play_time';
const METRIC_LIVE_VIEW_PERIOD_PLAY_TIME_SEC = 'live_view_period_play_time';
const METRIC_VOD_VIEW_PERIOD_PLAY_TIME_SEC = 'vod_view_period_play_time';
const METRIC_VIEW_BUFFER_TIME_SEC = 'view_buffer_time';
const METRIC_LIVE_VIEW_PERIOD_BUFFER_TIME_SEC = 'live_view_period_buffer_time';
const METRIC_ORIGIN_BANDWIDTH_SIZE_BYTES = 'origin_bandwidth_size';
Expand Down Expand Up @@ -829,6 +831,12 @@ protected static function init()
self::getSelectorFilter(self::DIMENSION_EVENT_TYPE, self::EVENT_TYPE_VIEW_PERIOD))),
self::getLongSumAggregator(self::METRIC_LIVE_VIEW_PERIOD_PLAY_TIME_SEC, self::METRIC_PLAY_TIME_SUM));

self::$aggregations_def[self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME_SEC] = self::getFilteredAggregator(
self::getAndFilter(array(
self::getSelectorFilter(self::DIMENSION_PLAYBACK_TYPE, self::PLAYBACK_TYPE_VOD),
self::getSelectorFilter(self::DIMENSION_EVENT_TYPE, self::EVENT_TYPE_VIEW_PERIOD))),
self::getLongSumAggregator(self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME_SEC, self::METRIC_PLAY_TIME_SUM));

self::$aggregations_def[self::METRIC_VIEW_BUFFER_TIME_SEC] = self::getFilteredAggregator(
self::getInFilter(self::DIMENSION_EVENT_TYPE, array(
self::EVENT_TYPE_VIEW, // realtime
Expand Down Expand Up @@ -1167,6 +1175,11 @@ protected static function init()
self::DRUID_POST_AGGR => self::getConstantRatioPostAggr(
self::METRIC_LIVE_VIEW_PERIOD_PLAY_TIME, self::METRIC_LIVE_VIEW_PERIOD_PLAY_TIME_SEC, '60'));

self::$metrics_def[self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME] = array(
self::DRUID_AGGR => array(self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME_SEC),
self::DRUID_POST_AGGR => self::getConstantRatioPostAggr(
self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME, self::METRIC_VOD_VIEW_PERIOD_PLAY_TIME_SEC, '60'));

self::$metrics_def[self::METRIC_DURATION_TOTAL_MSEC] = array(
self::DRUID_AGGR => array(self::METRIC_DURATION_SEC),
self::DRUID_POST_AGGR => self::getConstantFactorFieldAccessPostAggr(
Expand Down

0 comments on commit e6367fe

Please sign in to comment.