// NewMultiTimings creates a new MultiTimings object.
498575
func NewMultiTimings(name string, labels []string) *MultiTimings {
	t := &MultiTimings{
		Timings: Timings{histograms: make(map[string]*Histogram)},
		labels:  labels,
	}
	if name != "" {
		Publish(name, t)
	}
	return t
}
1208687
func setMultiMutator(shardClient Client, mapping *ShardMapping) []MutateResponse {
	return shardClient.SetMulti(mapping.Items)
}
430106
func (d *dbBase) InsertMulti(q dbQuerier, mi *modelInfo, sind reflect.Value, bulk int, tz *time.Location) (int64, error) {
	var (
		cnt    int64
		nums   int
		values []interface{}
		names  []string
	)

	// typ := reflect.Indirect(mi.addrField).Type()

	length := sind.Len()

	for i := 1; i <= length; i++ {

		ind := reflect.Indirect(sind.Index(i - 1))

		// Is this needed ?
		// if !ind.Type().AssignableTo(typ) {
		// 	return cnt, ErrArgs
		// }

		if i == 1 {
			vus, err := d.collectValues(mi, ind, mi.fields.dbcols, true, true, &names, tz)
			if err != nil {
				return cnt, err
			}
			values = make([]interface{}, bulk*len(vus))
			nums += copy(values, vus)

		} else {

			vus, err := d.collectValues(mi, ind, mi.fields.dbcols, true, true, nil, tz)
			if err != nil {
				return cnt, err
			}

			if len(vus) != len(names) {
				return cnt, ErrArgs
			}

			nums += copy(values[nums:], vus)
		}

		if i > 1 && i%bulk == 0 || length == i {
			num, err := d.InsertValue(q, mi, true, names, values[:nums])
			if err != nil {
				return cnt, err
			}
			cnt += num
			nums = 0
		}
	}

	return cnt, nil
}
25827
func NewMultiCounters(name string, labels []string) *MultiCounters {
	t := &MultiCounters{
		Counters: Counters{counts: make(map[string]int64)},
		labels:   labels,
	}
	if name != "" {
		Publish(name, t)
	}
	return t
}
316529
func NewMultiIterator(reverse bool, iterators ...KVIterator) *MultiIterator {
	// reuse backing array
	lessComp := -1
	if reverse {
		lessComp = 1
	}
	mi := &MultiIterator{
		iterators:     iterators,
		iteratorOrder: make(map[KVIterator]int),
		lessComp:      lessComp,
	}
	mi.init()
	return mi
}
574822
func (s *OrderService) CreateMulti(orders []SubmitOrder) (MultipleOrderResponse, error) {
	ordersMap := make([]interface{}, 0)
	for _, order := range orders {
		var side string
		if order.Amount < 0 {
			order.Amount = math.Abs(order.Amount)
			side = "sell"
		} else {
			side = "buy"
		}
		ordersMap = append(ordersMap, map[string]interface{}{
			"symbol":   order.Symbol,
			"amount":   strconv.FormatFloat(order.Amount, 'f', -1, 32),
			"price":    strconv.FormatFloat(order.Price, 'f', -1, 32),
			"exchange": "bitfinex",
			"side":     side,
			"type":     order.Type,
		})
	}

	payload := map[string]interface{}{
		"orders": ordersMap,
	}

	req, err := s.client.newAuthenticatedRequest("POST", "order/new/multi", payload)
	if err != nil {
		return MultipleOrderResponse{}, err
	}

	response := new(MultipleOrderResponse)
	_, err = s.client.do(req, response)

	return *response, err

}
1137575
func (env *Env) InitMultiMap(m map[string][]string) {
	(*env) = make([]string, 0, len(m))
	for k, vals := range m {
		for _, v := range vals {
			env.Set(k, v)
		}
	}
}
987871
func NewMultiaddr(s string) (a Multiaddr, err error) {
	defer func() {
		if e := recover(); e != nil {
			log.Printf("Panic in NewMultiaddr on input %q: %s", s, e)
			err = fmt.Errorf("%v", e)
		}
	}()
	b, err := stringToBytes(s)
	if err != nil {
		return nil, err
	}
	return &multiaddr{bytes: b}, nil
}
553906
func NewMultiPointFlat(layout Layout, flatCoords []float64) *MultiPoint {
	g := new(MultiPoint)
	g.layout = layout
	g.stride = layout.Stride()
	g.flatCoords = flatCoords
	return g
}
331623
func (bu *Binutils) SetFastSymbolization(fast bool) {
	bu.update(func(r *binrep) { r.fast = fast })
}
338049
func NewMultiError(errs ...error) *MultiError {
	return &MultiError{errs[:len(errs)-1], errs[len(errs)-1]}
}
353869
func (g *Generator) AddMultipleProcessEnv(envs []string) {
	g.initConfigProcess()

	for _, val := range envs {
		split := strings.SplitN(val, "=", 2)
		g.addEnv(val, split[0])
	}
}
140000
func (s *TestInvokeMethodInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodInput {
	s.MultiValueHeaders = v
	return s
}
919949
func NewMultisig(n int) *Multisignature {
	// Default the signature list to have a capacity of two, since we can
	// expect that most multisigs will require multiple signers.
	return &Multisignature{bitarray.NewCompactBitArray(n), make([][]byte, 0, 2)}
}
169758
func (a GatewayUnsupported) NewMultipartUpload(ctx context.Context, bucket string, object string, opts ObjectOptions) (uploadID string, err error) {
	return "", NotImplemented{}
}
861201
func (c *RawBinaryClient) AddMulti(items []*Item) []MutateResponse {
	return c.mutateMulti(opAdd, opAdd, items)
}
1223710
func SplitMultiElement(r rune) ([]rune, bool) {
	r = CompatJamo(r)
	es, ok := multiElements[r]
	return es, ok
}