func NewCollector(runner QueryRunner, valType prometheus.ValueType, metricName, query string) *Collector {
	return &Collector{
		runner:     runner,
		metricName: metricName,
		query:      query,
		valType:    valType,
		descs:      nil,
		metrics:    nil,
		mux:        sync.Mutex{},
	}
}
NewCollector creates a new BigQuery Collector instance.
package sql
import (
	"log"
	"sync"
	"time"
	"github.com/m-lab/go/logx"
	"github.com/prometheus/client_golang/prometheus"
)
type Metric struct {
	LabelKeys   []string
	LabelValues []string
	Values      map[string]float64
}
func NewMetric(labelKeys []string, labelValues []string, values map[string]float64) Metric {
	return Metric{
		LabelKeys:   labelKeys,
		LabelValues: labelValues,
		Values:      values,
	}
}
type QueryRunner interface {
	Query(q string) ([]Metric, error)
}
type Collector struct {
	runner QueryRunner
	metricName string
	query string
	valType prometheus.ValueType
	descs map[string]*prometheus.Desc
	metrics []Metric
	mux sync.Mutex
	RegisterErr error
}