// Collection will simplify the collection using this simplifier.
558489
func (s *RadialSimplifier) Collection(c orb.Collection) orb.Collection {
	return collection(s, c)
}
633785
func (c *collection) Properties(ctx context.Context) (CollectionProperties, error) {
	req, err := c.conn.NewRequest("GET", path.Join(c.relPath("collection"), "properties"))
	if err != nil {
		return CollectionProperties{}, WithStack(err)
	}
	resp, err := c.conn.Do(ctx, req)
	if err != nil {
		return CollectionProperties{}, WithStack(err)
	}
	if err := resp.CheckStatus(200); err != nil {
		return CollectionProperties{}, WithStack(err)
	}
	var data collectionPropertiesInternal
	if err := resp.ParseBody("", &data); err != nil {
		return CollectionProperties{}, WithStack(err)
	}
	return data.asExternal(), nil
}
1258078
func (m *MultiError) Collect(err error) {
	if err != nil {
		m.Errors = append(m.Errors, err)
	}
}
943285
func (s *resultSorter) Collect(si symbolPair) {
	s.resultsMu.Lock()
	score := score(s.Query, si)
	if score > 0 {
		sc := scoredSymbol{score, si}
		s.results = append(s.results, sc)
	}
	s.resultsMu.Unlock()
}
1045857
func (i DatabaseInventory) CollectionByName(name string) (InventoryCollection, bool) {
	for _, c := range i.Collections {
		if c.Parameters.Name == name {
			return c, true
		}
	}
	return InventoryCollection{}, false
}
594851
func (c *multiTimingsCollector) Collect(ch chan<- prometheus.Metric) {
	for cat, his := range c.mt.Timings.Histograms() {
		labelValues := strings.Split(cat, ".")
		ch <- prometheus.MustNewConstHistogram(
			c.desc,
			uint64(his.Count()),
			float64(his.Total())/1000000000,
			makeCumulativeBuckets(c.cutoffs, his.Buckets()),
			labelValues...)
	}
}
435245
func (self *Query) Count() (n int, err error) {

	return self.collection.Find(self.query).Count()
}
393907
func GetCollection(session *mgo.Session, collectionName string) *mgo.Collection {
	return session.DB(DB_NAME).C(collectionName)
}
810781
func (n NodeCollector) Collect(ch chan<- prometheus.Metric) {
	wg := sync.WaitGroup{}
	wg.Add(len(n.collectors))
	for name, c := range n.collectors {
		go func(name string, c collector.Collector) {
			execute(name, c, ch)
			wg.Done()
		}(name, c)
	}
	wg.Wait()
	scrapeDurations.Collect(ch)
}
610116
func (h *baseStatsHandler) Collect(in chan<- prometheus.Metric) {
	h.collector.Collect(in)
}
1341015
func (collection *Collection) Items() ([]Item, error) {
  val, err := collection.dbus.GetProperty("org.freedesktop.Secret.Collection.Items")
  if err != nil {
    return []Item{}, err
  }

  items := []Item{}
  for _, path := range val.Value().([]dbus.ObjectPath) {
    items = append(items, *NewItem(collection.conn, path))
  }

  return items, nil
}
283841
func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)

	_, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{})
	return err
}
481094
func (c *Collector) Collect(ctx context.Context, count uint64) {
	start := time.Now()
	for i := uint64(0); i < count; i++ {
		conn, err := c.ln.Accept()
		if err != nil {
			log.G(ctx).WithError(err).Error("failure accepting connection")
			continue
		}
		c.t.UpdateSince(start)
		conn.Close()
	}
}
907456
func (c *FakeGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(groupsResource, listOptions)

	_, err := c.Fake.Invokes(action, &user.GroupList{})
	return err
}
1270612
func (e expvarCollector) Collect(ch chan<- prometheus.Metric) {
	expvar.Do(func(kv expvar.KeyValue) {
		collector{
			f: func(m prometheus.Metric) {
				ch <- m
			},
			labelValues: []string{kv.Key},
			descs:       e.descs,
		}.collectVar(kv.Value)
	})
}
179546
func (c Collection) Clone() Collection {
	if c == nil {
		return nil
	}

	nc := make(Collection, len(c))
	for i, g := range c {
		nc[i] = Clone(g)
	}

	return nc
}
821365
func (wc *workflowCollector) Collect(ch chan<- prometheus.Metric) {
	workflows, err := wc.store.List()
	if err != nil {
		return
	}
	for _, wf := range workflows {
		wc.collectWorkflow(ch, *wf)
	}
}