ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilSessionStatistics Class Reference
+ Collaboration diagram for ilSessionStatistics:

Static Public Member Functions

static aggregateRaw (int $a_now)
 
static getLastAggregation ()
 Get timestamp of last aggregation. More...
 

Private Attributes

const int SLOT_SIZE = 15
 

Static Private Attributes

static ilDBStatement $number_of_active_raw_sessions_statement = null
 
static ilDBStatement $aggregated_raw_data_statement = null
 
static ilDBStatement $raw_data_statement = null
 

Detailed Description

Definition at line 21 of file class.ilSessionStatistics.php.

Member Function Documentation

◆ aggregateRaw()

static ilSessionStatistics::aggregateRaw ( int  $a_now)
static

Definition at line 234 of file class.ilSessionStatistics.php.

234 : void
235 {
236 if (!self::isActive()) {
237 return;
238 }
239
240 $slot = self::createNewAggregationSlot($a_now);
241 while (is_array($slot)) {
242 self::aggregateRawHelper($slot[0], $slot[1]);
243 $slot = self::createNewAggregationSlot($a_now);
244 }
245
246 // #12728
247 self::deleteAggregatedRaw($a_now);
248 }

Referenced by ilSessionStatisticsGUI\adminSync(), and ilAuthDestroyExpiredSessionsCron\run().

+ Here is the caller graph for this function:

◆ getLastAggregation()

static ilSessionStatistics::getLastAggregation ( )
static

Get timestamp of last aggregation.

Definition at line 512 of file class.ilSessionStatistics.php.

512 : ?int
513 {
514 global $DIC;
515
516 $ilDB = $DIC['ilDB'];
517
518 $sql = 'SELECT MAX(slot_end) latest FROM usr_session_stats';
519 $res = $ilDB->query($sql);
520 $row = $ilDB->fetchAssoc($res);
521 if ($row['latest'] !== null) {
522 return (int) $row['latest'];
523 }
524
525 //TODO check if return null as timestamp causes issues
526 return null;
527 }
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26

References $DIC, $ilDB, and $res.

Referenced by ilSessionStatisticsGUI\renderCurrentBasics().

+ Here is the caller graph for this function:

Field Documentation

◆ $aggregated_raw_data_statement

ilDBStatement ilSessionStatistics::$aggregated_raw_data_statement = null
staticprivate

Definition at line 26 of file class.ilSessionStatistics.php.

◆ $number_of_active_raw_sessions_statement

ilDBStatement ilSessionStatistics::$number_of_active_raw_sessions_statement = null
staticprivate

Definition at line 25 of file class.ilSessionStatistics.php.

◆ $raw_data_statement

ilDBStatement ilSessionStatistics::$raw_data_statement = null
staticprivate

Definition at line 27 of file class.ilSessionStatistics.php.

◆ SLOT_SIZE

const int ilSessionStatistics::SLOT_SIZE = 15
private

Definition at line 23 of file class.ilSessionStatistics.php.


The documentation for this class was generated from the following file: