func populateBenchmarkDB(env *Env, dbi DBI, rc *randSourceCursor) ([][]byte, error) {
	var ps [][]byte

	err := env.SetMapSize(benchDBMapSize)
	if err != nil {
		return nil, err
	}

	err = env.Update(func(txn *Txn) (err error) {
		for i := 0; i < benchDBNumKeys; i++ {
			k := makeBenchDBKey(rc)
			v := makeBenchDBVal(rc)
			err := txn.Put(dbi, k, v, 0)
			ps = append(ps, k, v)
			if err != nil {
				return err
			}
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return ps, nil
}
// populateBenchmarkDB fills env with data.
//
// populateBenchmarkDB calls env.SetMapSize and must not be called concurrent
// with other transactions.
populateBenchmarkDB fills env with data.

populateBenchmarkDB calls env.SetMapSize and must not be called concurrent
with other transactions.
// populateBenchmarkDB fills env with data . // // populateBenchmarkDB calls env . SetMapSize and must not be called concurrent // with other transactions .
func populateBenchmarkDB(env *Env, dbi DBI, rc *randSourceCursor) ([][]byte, error) {
	var ps [][]byte
	err := env.SetMapSize(benchDBMapSize)
	if err != nil {
		return nil, err
	}
	err = env.Update(func(txn *Txn) (err error) {
		for i := 0; i < benchDBNumKeys; i++ {
			k := makeBenchDBKey(rc)
			v := makeBenchDBVal(rc)
			err := txn.Put(dbi, k, v, 0)
			ps = append(ps, k, v)
			if err != nil {
				return err
			}
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return ps, nil
}
func populateBenchmarkDB ( env * Env , dbi DBI , rc * randSourceCursor ) ( [ ] [ ] byte , error ) { var ps [ ] [ ] byte err := env . SetMapSize ( benchDBMapSize ) if err != nil { return nil , err } err = env . Update ( func ( txn * Txn ) ( err error ) { for i := 0 ; i < benchDBNumKeys ; i ++ { k := makeBenchDBKey ( rc ) v := makeBenchDBVal ( rc ) err := txn . Put ( dbi , k , v , 0 ) ps = append ( ps , k , v ) if err != nil { return err } } return nil } ) if err != nil { return nil , err } return ps , nil }
populateBenchmarkDB fills env with data.
populateBenchmarkDB fills env with data .