func (b *benchmark) GetDBCreator() targets.DBCreator {
	return &dbCreator{ds: b.GetDataSource(), config: b.conf}
}
loader.Benchmark interface implementation
package clickhouse
import (
	"bufio"
	"fmt"
	"log"
	"github.com/timescale/tsbs/load"
	"github.com/timescale/tsbs/pkg/data"
	"github.com/timescale/tsbs/pkg/targets"
)
const dbType = "clickhouse"
type ClickhouseConfig struct {
	Host     string
	User     string
	Password string
	LogBatches bool
	InTableTag bool
	Debug      int
	DbName     string
}
type insertData struct {
	tags   string  
	fields string  
}
var tableCols map[string][]string
var tagColumnTypes []string
var fatal = log.Fatalf
func getConnectString(conf *ClickhouseConfig, db bool) string {
	if db {
		return fmt.Sprintf("tcp://%s:9000?username=%s&password=%s&database=%s", conf.Host, conf.User, conf.Password, conf.DbName)
	}
	return fmt.Sprintf("tcp://%s:9000?username=%s&password=%s", conf.Host, conf.User, conf.Password)
}
type point struct {
	table string
	row   *insertData
}
type tableArr struct {
	m   map[string][]*insertData
	cnt uint
}
func (ta *tableArr) Len() uint {
	return ta.cnt
}
func (ta *tableArr) Append(item data.LoadedPoint) {
	that := item.Data.(*point)
	k := that.table
	ta.m[k] = append(ta.m[k], that.row)
	ta.cnt++
}
type factory struct{}
func (f *factory) New() targets.Batch {
	return &tableArr{
		m:   map[string][]*insertData{},
		cnt: 0,
	}
}
const tagsPrefix = "tags"
func NewBenchmark(file string, hashWorkers bool, conf *ClickhouseConfig) targets.Benchmark {
	return &benchmark{
		ds: &fileDataSource{
			scanner: bufio.NewScanner(load.GetBufferedReader(file)),
		},
		hashWorkers: hashWorkers,
		conf:        conf,
	}
}
type benchmark struct {
	ds          targets.DataSource
	hashWorkers bool
	conf        *ClickhouseConfig
}
func (b *benchmark) GetDataSource() targets.DataSource {
	return b.ds
}
func (b *benchmark) GetBatchFactory() targets.BatchFactory {
	return &factory{}
}
func (b *benchmark) GetPointIndexer(maxPartitions uint) targets.PointIndexer {
	if b.hashWorkers {
		return &hostnameIndexer{
			partitions: maxPartitions,
		}
	}
	return &targets.ConstantIndexer{}
}
func (b *benchmark) GetProcessor() targets.Processor {
	return &processor{conf: b.conf}
}