// Active returns the number of active connections in the pool
512922
func (cp *ConnectionPool) Active() int64 {
	p := cp.pool()
	if p == nil {
		return 0
	}
	return p.Active()
}
1036220
func (pool *ObjectPool) GetNumActive() int {
	return pool.allObjects.Size() - pool.idleObjects.Size()
}
165923
func (p *Pool) ActiveCount() int {
	p.mu.Lock()
	active := p.active
	p.mu.Unlock()
	return active
}
405301
func (tp *TicketPool) CurrentPoolSize() int {
	tp.mtx.RLock()
	defer tp.mtx.RUnlock()
	return len(tp.pool)
}
99036
func (r *Docker) Active() bool {
	err := r.Runner.Run("systemctl is-active --quiet service docker")
	return err == nil
}
723350
func (c *T) Counts() conntracker.ConnectionStats {
	c.mu.Lock()
	defer c.mu.Unlock()

	return conntracker.ConnectionStats{
		http.StateNew:    c.copy(c.new),
		http.StateActive: c.copy(c.active),
		http.StateIdle:   c.copy(c.idle),
	}
}
80413
func (s *Store) CARootActive(ws memdb.WatchSet) (uint64, *structs.CARoot, error) {
	// Get all the roots since there should never be that many and just
	// do the filtering in this method.
	var result *structs.CARoot
	idx, roots, err := s.CARoots(ws)
	if err == nil {
		for _, r := range roots {
			if r.Active {
				result = r
				break
			}
		}
	}

	return idx, result, err
}
242239
func (c *Client) PoolStats() *PoolStats {
	stats := c.connPool.Stats()
	return (*PoolStats)(stats)
}
228733
func (cp *ConnectionPool) Capacity() int64 {
	p := cp.pool()
	if p == nil {
		return 0
	}
	return p.Capacity()
}
326381
func (s *XPackWatcherPutWatchService) Active(active bool) *XPackWatcherPutWatchService {
	s.active = &active
	return s
}
1286902
func (m *MonitorValues) FlattenActiveConnections() ([]FlatMonitorValue, error) {
	return m.flattenValue(func(v *MonitorValue) *float64 { return v.ActiveConnections })
}
1158249
func (s *UpdateProvisioningArtifactInput) SetActive(v bool) *UpdateProvisioningArtifactInput {
	s.Active = &v
	return s
}
488679
func (d *Deployment) Active() bool {
	switch d.Status {
	case DeploymentStatusRunning, DeploymentStatusPaused:
		return true
	default:
		return false
	}
}
793286
func (pool *TxPool) Status(hashes []common.Hash) []TxStatus {
	pool.mu.RLock()
	defer pool.mu.RUnlock()

	status := make([]TxStatus, len(hashes))
	for i, hash := range hashes {
		if tx := pool.all.Get(hash); tx != nil {
			from, _ := types.Sender(pool.signer, tx) // already validated
			if pool.pending[from] != nil && pool.pending[from].txs.items[tx.Nonce()] != nil {
				status[i] = TxStatusPending
			} else {
				status[i] = TxStatusQueued
			}
		}
	}
	return status
}
1117996
func (s *ListTagOptionsFilters) SetActive(v bool) *ListTagOptionsFilters {
	s.Active = &v
	return s
}
388380
func (s *Scheduler) activeFormationCount(appID string) int {
	activeReleases := make(map[string]struct{})
	for _, job := range s.jobs {
		if job.IsRunning() && job.IsInApp(appID) {
			activeReleases[job.Formation.Release.ID] = struct{}{}
		}
	}
	return len(activeReleases)
}
282129
func (c *NodeCommand) ListActive(client auth.ClientI) error {
	nodes, err := client.GetNodes(c.namespace, services.SkipValidation())
	if err != nil {
		return trace.Wrap(err)
	}
	coll := &serverCollection{servers: nodes}
	coll.writeText(os.Stdout)
	return nil
}