// With implements Histogram.
541541
func (h *Histogram) With(labelValues ...string) metrics.Histogram {
	return &Histogram{
		Name: h.Name,
		lvs:  h.lvs.With(labelValues...),
		h:    h.h,
	}
}
420162
func (h *Histogram) PrintWithUnit(w io.Writer, unit float64) {
	avg := float64(h.Sum) / float64(h.Count)
	fmt.Fprintf(w, "Count: %d  Min: %5.1f  Max: %5.1f  Avg: %.2f\n", h.Count, float64(h.Min)/unit, float64(h.Max)/unit, avg/unit)
	fmt.Fprintf(w, "%s\n", strings.Repeat("-", 60))
	if h.Count <= 0 {
		return
	}

	maxBucketDigitLen := len(strconv.FormatFloat(h.Buckets[len(h.Buckets)-1].LowBound, 'f', 6, 64))
	if maxBucketDigitLen < 3 {
		// For "inf".
		maxBucketDigitLen = 3
	}
	maxCountDigitLen := len(strconv.FormatInt(h.Count, 10))
	percentMulti := 100 / float64(h.Count)

	accCount := int64(0)
	for i, b := range h.Buckets {
		fmt.Fprintf(w, "[%*f, ", maxBucketDigitLen, b.LowBound/unit)
		if i+1 < len(h.Buckets) {
			fmt.Fprintf(w, "%*f)", maxBucketDigitLen, h.Buckets[i+1].LowBound/unit)
		} else {
			fmt.Fprintf(w, "%*s)", maxBucketDigitLen, "inf")
		}

		accCount += b.Count
		fmt.Fprintf(w, "  %*d  %5.1f%%  %5.1f%%", maxCountDigitLen, b.Count, float64(b.Count)*percentMulti, float64(accCount)*percentMulti)

		const barScale = 0.1
		barLength := int(float64(b.Count)*percentMulti*barScale + 0.5)
		fmt.Fprintf(w, "  %s\n", strings.Repeat("#", barLength))
	}
}
823404
func (c *Client) With(opts ...Opt) Opt {
	return Opts(opts).Merged().Apply(c)
}
756679
func (c *HTTPClientMock) With(headers map[string]string) HTTPClientInterface {
	c.headers = headers
	return c
}
150153
func (l Logger) With(keyvals ...interface{}) Logger {
	return Logger{
		Writer:    l.Writer,
		Formatter: l.Formatter,
		context:   append(l.context, keyvals...),
	}
}
280404
func (h Histogram) With(labelValues ...string) metrics.Histogram {
	next := make(Histogram, len(h))
	for i := range h {
		next[i] = h[i].With(labelValues...)
	}
	return next
}
90916
func (m *MockSummaryVec) With(arg0 prometheus.Labels) prometheus.Observer {
	ret := m.ctrl.Call(m, "With", arg0)
	ret0, _ := ret[0].(prometheus.Observer)
	return ret0
}
1249254
func (hg histogramGauge) With(labelValues ...string) metrics.Gauge {
	return histogramGauge{hg.h.With(labelValues...)}
}
405526
func (hc histogramCounter) With(labelValues ...string) metrics.Counter {
	return histogramCounter{hc.h.With(labelValues...)}
}
1292647
func (cg counterGauge) With(labelValues ...string) metrics.Gauge {
	return counterGauge{cg.c.With(labelValues...)}
}
697115
func (l Levels) With(keyvals ...interface{}) Levels {
	return Levels{
		logger:     log.With(l.logger, keyvals...),
		levelKey:   l.levelKey,
		debugValue: l.debugValue,
		infoValue:  l.infoValue,
		warnValue:  l.warnValue,
		errorValue: l.errorValue,
		critValue:  l.critValue,
	}
}
668805
func (o *GetLookupsIDParams) WithID(id string) *GetLookupsIDParams {
	o.ID = id
	return o
}
1165375
func With(recursive bool, name string, subQuery SqlExpression) CommonTableExpression {
	return commonExpr{recursive: recursive, name: Literal(name), subQuery: subQuery}
}
401285
func (l *Context) With(keyvals ...interface{}) *Context {
	if len(keyvals)%2 != 0 {
		panic("Programmer error.  Please call log.Context.With() only with an even number of arguments.")
	}
	if len(keyvals) == 0 || l == nil {
		return l
	}
	return &Context{
		Logger:  l.Logger,
		KeyVals: addArrays(l.KeyVals, keyvals),
	}
}
762158
func With(values ...interface{}) ContextLogger {
	if len(values) == 1 {
		return &contextLogger{isTrue: true, data: values[0]}
	}
	return &contextLogger{isTrue: true, data: values}
}
420584
func (h *Histogram) Count() (count int64) {
	for i := range h.buckets {
		count += h.buckets[i].Get()
	}
	return
}
957823
func (c *Config) WithRegion(region string) *Config {
	c.Region = &region
	return c
}