Returns statistics regarding the use of each index for the collection.

@see https://docs.mongodb.org/manual/reference/operator/aggregation/indexStats/
426912
public function indexStats() : Stage\IndexStats
    {
        $stage = new Stage\IndexStats($this);
        $this->addStage($stage);

        return $stage;
    }
1039818
@Override
    public ResponseEntity<MgmtSystemStatisticsRest> getSystemUsageStats() {
        final SystemUsageReportWithTenants report = systemManagement.getSystemUsageStatisticsWithTenants();

        final MgmtSystemStatisticsRest result = new MgmtSystemStatisticsRest()
                .setOverallActions(report.getOverallActions()).setOverallArtifacts(report.getOverallArtifacts())
                .setOverallArtifactVolumeInBytes(report.getOverallArtifactVolumeInBytes())
                .setOverallTargets(report.getOverallTargets()).setOverallTenants(report.getTenants().size());

        result.setTenantStats(report.getTenants().stream().map(MgmtSystemManagementResource::convertTenant)
                .collect(Collectors.toList()));

        return ResponseEntity.ok(result);
    }
170955
def stats(self, indices=None):
        
        path = self.conn._make_path(indices, (), "_stats")
        return self.conn._send_request('GET', path)
692391
def get_statistics(self):
        
        stats = {
            "creation_time": self._creation_time_in_seconds,
            "evictions": self._evictions,
            "expirations": self._expirations,
            "misses": self._misses,
            "hits": self._hits,
            "invalidations": self._invalidations,
            "invalidation_requests": self._invalidation_requests,
            "owned_entry_count": self.__len__(),
            "owned_entry_memory_cost": getsizeof(self),
        }

        return stats
1304227
public int[] getElementIndices() {
        if (indices != null)
            return indices;
        Integer[] objIndices = indexToValue.keySet().toArray(new Integer[0]);
        indices = new int[objIndices.length];
        for (int i = 0; i < objIndices.length; ++i)
            indices[i] = objIndices[i].intValue();
        // sort the indices
        Arrays.sort(indices);
        return indices;
    }
58706
def stats(self):
        
        def redFunc(left_counter, right_counter):
            return left_counter.mergeStats(right_counter)

        return self.mapPartitions(lambda i: [StatCounter(i)]).reduce(redFunc)
817331
private Map<String, String[]> getShards(DBCollection collection) {
        DB config = collection.getDB().getSisterDB("config");
        DBCollection configShards = config.getCollection("shards");

        DBCursor cursorShards = configShards.find();

        Map<String, String[]> map = new HashMap<>();
        while (cursorShards.hasNext()) {
            DBObject currentShard = cursorShards.next();
            String currentHost = (String) currentShard.get("host");
            int slashIndex = currentHost.indexOf("/");
            if (slashIndex > 0) {
                map.put((String) currentShard.get(MONGO_DEFAULT_ID),
                        currentHost.substring(slashIndex + 1).split(","));
            }
        }
        return map;
    }
1142335
public com.google.api.ads.admanager.axis.v201805.Stats getStats() {
        return stats;
    }
693952
public function stats() {
		$res = [];

		$query = $this->find();
		$list = $query
			->select(['count' => $query->count(), 'country_id'])
			->group('country_id')
			->hydrate(false)
			->all();

		foreach ($list as $x) {
			$res[$x['country_id']] = (int)$x['count'];
		}

		return $res;
	}
595146
public function getStatistics($index = -1, $num = 100)
    {
        if ($index < 0) {
            return $this->statisticsMap;
        }
        $data['total'] = ceil(count($this->statisticsMap) / $num);
        $data['data'] = array_slice($this->statisticsMap, $num * $index, $num);
        return $data;
    }
925318
private function _sortIndex()
    {
        $collection = ResourceTable::collection();
        $sort = $collection->getSort();

        return $sort['index'] ? $sort['index'] : null;
    }
286900
def getIndexes(self) :
        """"""
        url = "%s/index" % self.database.URL
        r = self.connection.session.get(url, params = {"collection": self.name})
        data = r.json()
        for ind in data["indexes"] :
            self.indexes[ind["type"]][ind["id"]] = Index(collection = self, infos = ind)

        return self.indexes
852732
public Map<String, NailStats> getNailStats() {
    Map<String, NailStats> result = new TreeMap();
    synchronized (allNailStats) {
      for (Map.Entry<String, NailStats> entry : allNailStats.entrySet()) {
        result.put(entry.getKey(), (NailStats) entry.getValue().clone());
      }
    }
    return result;
  }
192663
public static clusterinstance_stats[] get(nitro_service service) throws Exception{
		clusterinstance_stats obj = new clusterinstance_stats();
		clusterinstance_stats[] response = (clusterinstance_stats[])obj.stat_resources(service);
		return response;
	}
1261418
public function getAggregationCounts() {
        $counts = [];

        if (!isset($this->rawResponse['aggregations'])) {
            return $counts;
        }

        foreach ($this->rawResponse['aggregations'] as $name => $aggregation) {

            if (empty($aggregation['buckets'])) {
                continue; // Not all aggregations will count something...
            }

            foreach ($aggregation['buckets'] as $bucket) {
                $counts[$name][$bucket['key']] = $bucket['doc_count'];
            }
        }

        return $counts;
    }
784047
function getIndexes(done, results) {
  var client = results.client;
  var ns = mongodbNS(results.namespace);
  client
    .db(ns.database)
    .collection(ns.collection)
    .indexes(function(err, indexes) {
      if (err) {
        done(err);
      }
      // add ns field to each index
      _.each(indexes, function(idx) {
        idx.ns = ns.ns;
      });
      done(null, indexes);
    });
}
538706
public function GetIndexStatus()
    {
        $dStatus = false;
        if ($this->IsRunning()) {
            $iRemainingRows = $this->GetRemainingRowCount();
            if (0 == $iRemainingRows) {
                $dStatus = false;
                $this->IndexCompletedHook();
            } else {
                $dStatus = (($this->fieldTotalRowsToProcess - $iRemainingRows) / $this->fieldTotalRowsToProcess) * 100;
            }
        }

        return $dStatus;
    }