Overview

Namespaces

  • Net
    • Bazzline
      • Component
        • ApacheServerStatusParser
          • DomainModel
          • Service
            • Builder
            • Content
              • Fetcher
              • Parser
              • Processor
              • Storage
            • StateMachine

Classes

  • Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\Detail
  • Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\Information
  • Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\Scoreboard
  • Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\Statistic
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\AbstractStorageBuilder
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\LocalStorageBuilder
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\ParserBuilder
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\ParserBuilderFactory
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\RemoteStorageBuilder
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Fetcher\AbstractFetcher
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Fetcher\FileFetcher
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Fetcher\HttpFetcher
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\DetailLineParser
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\DetailListOfLineParser
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\InformationListOfLineParser
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\ScoreboardListOfLineParser
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\StatisticListOfLineParser
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Processor\Processor
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Storage\DetailOnlyStorage
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Storage\FullStorage
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\StateMachine\SectionStateMachine

Interfaces

  • Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\ReduceDataAbleToArrayInterface
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\BuilderInterface
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Fetcher\FetcherInterface
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\LineParserInterface
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\ListOfLineParserInterface
  • Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Storage\StorageInterface
  • Overview
  • Namespace
  • Class
  1:   2:   3:   4:   5:   6:   7:   8:   9:  10:  11:  12:  13:  14:  15:  16:  17:  18:  19:  20:  21:  22:  23:  24:  25:  26:  27:  28:  29:  30:  31:  32:  33:  34:  35:  36:  37:  38:  39:  40:  41:  42:  43:  44:  45:  46:  47:  48:  49:  50:  51:  52:  53:  54:  55:  56:  57:  58:  59:  60:  61:  62:  63:  64:  65:  66:  67:  68:  69:  70:  71:  72:  73:  74:  75:  76:  77:  78:  79:  80:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 
<?php
/**
 * @author stev leibelt <artodeto@bazzline.net>
 * @since 2017-04-04
 */

namespace Net\Bazzline\Component\ApacheServerStatusParser\DomainModel;

class Statistic implements ReduceDataAbleToArrayInterface
{
    const REDUCED_DATA_TO_ARRAY_KEY_B_PER_SECOND                            = 'b_per_request';
    const REDUCED_DATA_TO_ARRAY_KEY_CPU_LOAD                                = 'cpu_load';
    const REDUCED_DATA_TO_ARRAY_KEY_CPU_USAGE                               = 'cpu_usage';
    const REDUCED_DATA_TO_ARRAY_KEY_CURRENT_TIMESTAMP                       = 'current_timestamp';
    const REDUCED_DATA_TO_ARRAY_KEY_IDLE_WORKERS                            = 'idle_workers';
    const REDUCED_DATA_TO_ARRAY_KEY_KB_PER_REQUEST                          = 'kb_per_request';
    const REDUCED_DATA_TO_ARRAY_KEY_PARENT_SERVER_CONFIGURATION_GENERATION  = 'parent_server_configuration_generation';
    const REDUCED_DATA_TO_ARRAY_KEY_PARENT_SERVER_MPM_GENERATION            = 'parent_server_mpm_generation';
    const REDUCED_DATA_TO_ARRAY_KEY_REQUESTS_CURRENTLY_BEING_PROCESSED      = 'requests_currently_being_processed';
    const REDUCED_DATA_TO_ARRAY_KEY_REQUESTS_PER_SECOND                     = 'requests_per_second';
    const REDUCED_DATA_TO_ARRAY_KEY_RESTART_TIMESTAMP                       = 'restart_timestamp';
    const REDUCED_DATA_TO_ARRAY_KEY_SERVER_LOAD                             = 'server_load';
    const REDUCED_DATA_TO_ARRAY_KEY_SERVER_UP_TIME                          = 'server_up_time';
    const REDUCED_DATA_TO_ARRAY_KEY_TOTAL_ACCESSES                          = 'total_accesses';
    const REDUCED_DATA_TO_ARRAY_KEY_TOTAL_TRAFFIC                           = 'total_traffic';

    /** @var int */
    private $bPerSecond;

    /** @var float */
    private $cpuLoad;

    /** @var string */
    private $cpuUsage;

    /** @var int */
    private $currentTimestamp;

    /** @var int */
    private $idleWorkers;

    /** @var float */
    private $kbPerRequest;

    /** @var int */
    private $parentServerConfigurationGeneration;

    /** @var int */
    private $parentServerMpmGeneration;

    /** @var int */
    private $requestCurrentlyBeingProcessed;

    /** @var int */
    private $requestPerSecond;

    /** @var int */
    private $restartTimestamp;

    /** @var string */
    private $serverLoad;

    /** @var string */
    private $serverUpTime;

    /** @var int */
    private $totalAccess;

    /** @var string */
    private $totalTraffic;

    public function __construct(
        $bPerSecond,
        $cpuLoad,
        $cpuUsage,
        $currentTimestamp,
        $idleWorkers,
        $kbPerRequest,
        $parentServerConfigurationGeneration,
        $parentServerMpmGeneration,
        $requestCurrentlyBeingProcessed,
        $requestPerSecond,
        $restartTimestamp,
        $serverLoad,
        $serverUpTime,
        $totalAccess,
        $totalTraffic
    ) {
        $this->bPerSecond                           = $bPerSecond;
        $this->cpuLoad                              = $cpuLoad;
        $this->cpuUsage                             = $cpuUsage;
        $this->currentTimestamp                     = $currentTimestamp;
        $this->idleWorkers                          = $idleWorkers;
        $this->kbPerRequest                         = $kbPerRequest;
        $this->parentServerConfigurationGeneration  = $parentServerConfigurationGeneration;
        $this->parentServerMpmGeneration            = $parentServerMpmGeneration;
        $this->requestCurrentlyBeingProcessed       = $requestCurrentlyBeingProcessed;
        $this->requestPerSecond                     = $requestPerSecond;
        $this->restartTimestamp                     = $restartTimestamp;
        $this->serverLoad                           = $serverLoad;
        $this->serverUpTime                         = $serverUpTime;
        $this->totalAccess                          = $totalAccess;
        $this->totalTraffic                         = $totalTraffic;
    }

    /**
     * @return int
     */
    public function bPerSecond()
    {
        return $this->bPerSecond;
    }

    /**
     * @return float
     */
    public function cpuLoad()
    {
        return $this->cpuLoad;
    }

    /**
     * @return string
     */
    public function cpuUsage()
    {
        return $this->cpuUsage;
    }

    /**
     * @return int
     */
    public function currentTimestamp()
    {
        return $this->currentTimestamp;
    }

    /**
     * @return int
     */
    public function idleWorkers()
    {
        return $this->idleWorkers;
    }

    /**
     * @return float
     */
    public function kbPerRequest()
    {
        return $this->kbPerRequest;
    }

    /**
     * @return int
     */
    public function parentServerConfigurationGeneration()
    {
        return $this->parentServerConfigurationGeneration;
    }

    /**
     * @return int
     */
    public function parentServerMpmGeneration()
    {
        return $this->parentServerMpmGeneration;
    }

    /**
     * @return int
     */
    public function requestCurrentlyBeingProcessed()
    {
        return $this->requestCurrentlyBeingProcessed;
    }

    /**
     * @return int
     */
    public function requestPerSecond()
    {
        return $this->requestPerSecond;
    }

    /**
     * @return int
     */
    public function restartTimestamp()
    {
        return $this->restartTimestamp;
    }

    /**
     * @return string
     */
    public function serverLoad()
    {
        return $this->serverLoad;
    }

    /**
     * @return string
     */
    public function serverUpTime()
    {
        return $this->serverUpTime;
    }

    /**
     * @return int
     */
    public function totalAccess()
    {
        return $this->totalAccess;
    }

    /**
     * @return string
     */
    public function totalTraffic()
    {
        return $this->totalTraffic;
    }

    /**
     * @return array
     */
    public function reduceDataToArray()
    {
        return [
            self::REDUCED_DATA_TO_ARRAY_KEY_B_PER_SECOND                            => $this->bPerSecond,
            self::REDUCED_DATA_TO_ARRAY_KEY_CPU_LOAD                                => $this->cpuLoad,
            self::REDUCED_DATA_TO_ARRAY_KEY_CPU_USAGE                               => $this->cpuUsage,
            self::REDUCED_DATA_TO_ARRAY_KEY_CURRENT_TIMESTAMP                       => $this->currentTimestamp,
            self::REDUCED_DATA_TO_ARRAY_KEY_IDLE_WORKERS                            => $this->idleWorkers,
            self::REDUCED_DATA_TO_ARRAY_KEY_KB_PER_REQUEST                          => $this->kbPerRequest,
            self::REDUCED_DATA_TO_ARRAY_KEY_PARENT_SERVER_CONFIGURATION_GENERATION  => $this->parentServerConfigurationGeneration,
            self::REDUCED_DATA_TO_ARRAY_KEY_PARENT_SERVER_MPM_GENERATION            => $this->parentServerMpmGeneration,
            self::REDUCED_DATA_TO_ARRAY_KEY_REQUESTS_CURRENTLY_BEING_PROCESSED      => $this->requestCurrentlyBeingProcessed,
            self::REDUCED_DATA_TO_ARRAY_KEY_REQUESTS_PER_SECOND                     => $this->requestPerSecond,
            self::REDUCED_DATA_TO_ARRAY_KEY_RESTART_TIMESTAMP                       => $this->restartTimestamp,
            self::REDUCED_DATA_TO_ARRAY_KEY_SERVER_LOAD                             => $this->serverLoad,
            self::REDUCED_DATA_TO_ARRAY_KEY_SERVER_UP_TIME                          => $this->serverUpTime,
            self::REDUCED_DATA_TO_ARRAY_KEY_TOTAL_ACCESSES                          => $this->totalAccess,
            self::REDUCED_DATA_TO_ARRAY_KEY_TOTAL_TRAFFIC                           => $this->totalTraffic
        ];
    }
}
PHP Apache Status Parser by bazzline.net API documentation generated by ApiGen