Get table status percentage
@return float
11266
public function getStatus()
    {
        $tables = count($this->getTables());
        $unhealth = count($this->getUnhealthyTable());

        if ($tables) {
            $healthy = $tables - $unhealth;

            return ($healthy / $tables) * 100;
        }

        return 100;
    }
1322373
public function getStatus ()
		{
			if (!$this->_status)
			{
				$this->_status = self::S_UNKNOWN;

				$headers = array_reverse($this->_headers);
				foreach ($headers as $header)
				{
					preg_match("/HTTP\/1.1 (\d{3})/", $header, $match);
					if (isset($match[ 1 ]))
					{
						$this->_status = (int) $match[ 1 ];
						break;
					}
				}
			}

			return $this->_status;
		}
1196347
public function getStatus()
    {
        if (   !strlen($this->getValue('status'))
            && !in_array($this->getType(), array('validation-error', 'error')))
        {
            $this->offsetSet('status', 'processing');
        }

        return strtolower($this->getValue('status'));
    }
553357
public function status() {
		$request = new CPS_StatusRequest();
		$this->_lastResponse = $this->_connection->sendRequest($request);
		return $this->_lastResponse->getStatus();
	}
819563
public function getStatus()
    {
        $status = null;

        if($entity = $this->getIterator()->current()) {
            $status = $entity->getStatus();
        }

        return $status;
    }
1283274
function statusText()
    {
        if ( $this->Progress == 100 )
        {
            return self::STATUS_COMPLETE;
        }

        if ( $this->Progress < 0 )
        {
            return self::STATUS_NOT_STARTED;
        }

        $timeSinceLastReport = time() - $this->LastReportTimestamp;

        if ( $timeSinceLastReport <= self::STATUS_ACTIVE_TIMEOUT )
        {
            return self::STATUS_ACTIVE;
        }

        if ( $timeSinceLastReport <= self::STATUS_DELAYED_TIMEOUT )
        {
            return self::STATUS_DELAYED;
        }

        return self::STATUS_DEAD;
    }
295674
public function status()
	{
		if ($this->status === null) {
			$stdClass = $this->decoded();
			if ( ! $stdClass instanceof stdClass)
				return null;

			$this->status = $this->resolveStatusFromStdClass($stdClass);
		}

		return $this->status;
	}
1161482
public function getTotal()
  {
    $rawQuery = "SELECT count(*) as total FROM orders";

    // Perform the raw query.
    $rawResults = DB::select( DB::raw($rawQuery) );

    // Return the total.
    return $rawResults[0]->total;
  }
740272
public function status() {
		$timeout = Config::defaultworkertimeout();
		$thresholdTime = (new FrozenTime())->subSeconds($timeout);

		$results = $this->find()
			->where(['modified >' => $thresholdTime])
			->orderDesc('modified')
			->enableHydration(false)
			->all()
			->toArray();

		if (!$results) {
			return [];
		}

		$count = count($results);
		$record = array_shift($results);
		/** @var \Cake\I18n\FrozenTime $time */
		$time = $record['modified'];

		return [
			'time' => $time,
			'workers' => $count,
		];
	}
723226
public function getStatus()
    {
        $status = self::STATUS_OK;

        foreach ($this->getItems() as $item) {
            if ($item->getStatus() === self::STATUS_ERROR) {
                return self::STATUS_ERROR;
            }

            if ($item->getStatus() === self::STATUS_WARNING) {
                $status = self::STATUS_WARNING;
            }
        }

        return $status;
    }
245310
public function getPortStatus()
    {
        $status = $this->portConfig;
        foreach ($status as &$value) {
            $value['fdcount'] = 0;
        }
        foreach (get_instance()->server->connections as $fd) {
            $port = get_instance()->getServerPort($fd);
            if (array_key_exists($port, $status)) {
                $status[$port]['fdcount']++;
            }
        }
        return $status;
    }
92459
public function getUpgradeStatusDetails() {
    $storage = $this->getLoggerEntityStorage();
    $total_count = (int) $storage->getQuery()
      ->count()
      ->execute();

    if ($total_count === 0) {
      return [
        'resolved' => 0,
        'conflicts' => 0,
        'total' => 0,
      ];
    }

    $conflicts = (int) $storage->getQuery()
      ->condition('status', 0)
      ->count()
      ->execute();
    return [
      'resolved' => $total_count - $conflicts,
      'conflicts' => $conflicts,
      'total' => $total_count,
    ];
  }
843282
public function get_status() {

        $pluginman = $this->pluginman;

        if (is_null($this->versiondb) and is_null($this->versiondisk)) {
            return core_plugin_manager::PLUGIN_STATUS_NODB;

        } else if (is_null($this->versiondb) and !is_null($this->versiondisk)) {
            return core_plugin_manager::PLUGIN_STATUS_NEW;

        } else if (!is_null($this->versiondb) and is_null($this->versiondisk)) {
            if ($pluginman::is_deleted_standard_plugin($this->type, $this->name)) {
                return core_plugin_manager::PLUGIN_STATUS_DELETE;
            } else {
                return core_plugin_manager::PLUGIN_STATUS_MISSING;
            }

        } else if ((float)$this->versiondb === (float)$this->versiondisk) {
            // Note: the float comparison should work fine here
            //       because there are no arithmetic operations with the numbers.
            return core_plugin_manager::PLUGIN_STATUS_UPTODATE;

        } else if ($this->versiondb < $this->versiondisk) {
            return core_plugin_manager::PLUGIN_STATUS_UPGRADE;

        } else if ($this->versiondb > $this->versiondisk) {
            return core_plugin_manager::PLUGIN_STATUS_DOWNGRADE;

        } else {
            // $version = pi(); and similar funny jokes - hopefully Donald E. Knuth will never contribute to Moodle ;-)
            throw new coding_exception('Unable to determine plugin state, check the plugin versions');
        }
    }
250217
public function getStatus()
    {

        $info_array                 = array();
        $info_array ['status']      = parent::getStats();
        $info_array ['version']     = parent::getVersion();
        $info_array ['server_list'] = parent::getServerList();

        return $info_array;
    }
323494
public function getRating() : ?float 
    {
        if ( ! $this->hasRating()) {
            $this->setRating($this->getDefaultRating());
        }
        return $this->rating;
    }
1154652
public function findWithStatus()
    {
        $scales = $this->createQueryBuilder('s')
            ->select('s.id', 's.name', 'COUNT(c) AS competencies')
            ->leftJoin('s.competencies', 'c')
            ->groupBy('s')
            ->getQuery()
            ->getArrayResult();

        $abilityCounts = $this->createQueryBuilder('s')
            ->select('s.id', 'COUNT (ca) AS abilities')
            ->leftJoin('s.levels', 'l')
            ->leftJoin('l.competencyAbilities', 'ca')
            ->groupBy('s')
            ->getQuery()
            ->getArrayResult();

        return array_map(function ($element) use ($abilityCounts) {
            foreach ($abilityCounts as $counts) {
                if ($counts['id'] === $element['id']) {
                    $element['abilities'] = $counts['abilities'];

                    return $element;
                }
            }
        }, $scales);
    }
625348
public function getPercent()
	{
		if ($this->duration == 0)
		{
			return -1;
		}
		
		$percent = $this->time / $this->duration * 100 / $this->totalPass;
		
		return round(min(100, $percent + 100 / $this->totalPass * ($this->currentPass - 1)), 2);
	}